この記事は、経験豊富なHow.com.vnの編集者と調査員から成るチームによって執筆されています。調査員チームは内容の正確性と網羅性を確認しています。
How.com.vnのコンテンツ管理チームは、編集チームが編集した記事を細心の注意を払って精査し、すべての記事がHow.com.vnの高品質基準を満たしているかどうかを確認しています。
この記事には11件の参照文献があり、文献一覧は記事の最後に表示されています。
この記事は8,031回アクセスされました。
パソコンにインストールされている電卓を使って計算をする方法はいくつもありますが、簡単なHTMLコードを使って電卓を自作するという別の方法もあります。HTMLで電卓を作成するときは、まずHTMLの基礎を押さえ、必要なコードをテキストエディタにコピーし、拡張子を「.html」にして保存しましょう。これでお気に入りのブラウザでHTML文書を開いて、電卓を使うことができます。このようにして、ブラウザで計算ができるだけでなく、プログラミングの基礎を学ぶこともできるのです。
ステップ
- パソコンでテキスト編集プログラムを起動する 使えるプログラムはいくつもありますが、利便性や品質を考えると、「テキストエディット」または「メモ帳」を使ったほうがよいでしょう。[9][10]
- Macの場合は、画面右上の虫眼鏡をクリックして、「Spotlight」を起動しましょう。「Spotlight」が起動したら、「テキストエディット」と入力して、「テキストエディット」というプログラムをクリックします。これで、青色にハイライト表示されるはずです。
- Windowsの場合は、画面左下の「スタート」メニューを開きましょう。「スタート」メニューを開いたら、検索ボックスに「メモ帳」と入力すると、右側の検索結果に「メモ帳」というアプリケーションが表示されるので、そのアプリケーションをクリックします。
- 電卓のHTMLコードを文書に貼り付ける
- Macの場合は、文書の本文をクリックして、Command+Vを押しましょう。コードを貼り付けたら、画面上部のフォーマットをクリックして、標準テキストにするをクリックする必要があります。[11]
- Windowsの場合は、文書の本文をクリックして、「Ctrl + V」を押しましょう。
- ファイルを保存する ウィンドウ左上の「ファイル」ボタンをクリックして、ドロップダウンメニューから名前を付けて保存...(Windows)または保存...(Mac)を選択します。
- ファイル名に「.html」という拡張子をつける 「名前を付けて保存」メニューが表示されたら、ファイル名の後に「.html」という拡張子を入力して、「保存」をクリックしましょう。例えば、このファイルを「電卓1」にしたい場合は、「電卓1.html」というファイル名で保存します。広告
ポイント
- この電卓は、必要に応じてWebページに埋め込むことができます。
- また、HTMLのスタイルを指定すれば、電卓のデザインを変更することも可能です。
出典
- ↑ http://www.w3schools.com/html/html_basic.asp
- ↑ http://www.w3schools.com/html/html_head.asp
- ↑ http://www.w3schools.com/html/html_formatting.asp
- ↑ http://www.w3schools.com/tags/att_input_type.asp
- ↑ http://www.w3schools.com/tags/att_input_value.asp
- ↑ http://www.w3schools.com/tags/ref_eventattributes.asp
- ↑ http://www.w3schools.com/tags/tag_br.asp
- ↑ http://www.w3schools.com/html/html_forms.asp
- ↑ http://computers.tutsplus.com/tutorials/quick-tip-configure-textedit-for-coding-html--mac-44786
このHow.com.vn記事について
この記事は役に立ちましたか?
⚠️ Disclaimer:
Content from Wiki How 日本語 language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.
- - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
- - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
- - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
- - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.