Java Script入門

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Java Script入門 - Presentation Transcript

    1. JavaScript入門 Daisuke Furukawa http://mogya.com
    2. 最近の 出来事
    3. 取引先が 経営破綻
    4. お仕事 募集中
    5. 今日の話
    6. JavaScript 入門
    7. よくあるやつ
    8. うれしい?
    9. 実用的な 話を
    10. 教材
    11. 実用的
    12. JavaScript の 書き方
    13. JavaScriptの書き方
    14. JavaScriptの書き方
    15. HTML <h1>小さい“つ”が消えるマシーン JavaScript版</h1> <p> 入力した文章の「小さい“つ”」を消してくれるマシーンを JavaScriptで書いてみたものです。 </p> <script type=\"text/javascript\" src=\"tu.js\"></script> <form> <textarea id=\"tu_input\" cols=\"80\" rows=\"5\"> ニッポン の ヘッド である 総理 の グッズ </textarea> <p>↓↓↓ 小さい“つ”が消えた!? ↓↓↓</p> <textarea id=\"tu_output\" cols=\"80\" rows=\"5\"></textarea> </form>
    16. JavaScript var output = document.getElementById(\"tu_output\"); output.value = \"もぎゃ\"; <textarea id=\"tu_output\" cols=\"80\" rows=\"5\"> </textarea>
    17. 「っ」を消す var input = document.getElementById(\"tu_input\"); var output = document.getElementById(\"tu_output\"); var text_in = input.value; var text_out = \"\"; var i=0; for (i = 0; i < text_in.length; i++) { if( text_in.charAt(i).match(/っ|ッ/) == null ){ text_out += text_in.charAt(i); } } output.value = text_out;
    18. イベント
    19. 関数 function update_tu(){ var input = document.getElementById(\"tu_input\"); var output = document.getElementById(\"tu_output\"); var text_in = input.value; var text_out = \"\"; var i=0; for (i = 0; i < text_in.length; i++) { if( text_in.charAt(i).match(/っ|ッ/) == null ){ text_out += text_in.charAt(i); } } output.value = text_out; }
    20. <h1>小さい“つ”が消えるマシーン JavaScript版</h1> <p> 入力した文章の「小さい“つ”」を消してくれるマシーンをJavaScriptで書いてみたもので す。 </p> <script type=\"text/javascript\" src=\"tu.js\"></script> <form> onkeyup=\"update_tu();\"> <textarea id=\"tu_input\" cols=\"80\" rows=\"5\" ニッポン の ヘッド である 総理 の グッズ</textarea> <p>↓↓↓ 小さい“つ”が消えた!? ↓↓↓</p> <textarea id=\"tu_output\" cols=\"80\" rows=\"5\"></textarea> </form>
    21. まとめ HTMLは、必要な部分にidをつけておく <form> <textarea id=\"tu_input\" cols=\"80\" rows=\"5\"> ニッポン の ヘッド である 総理 の グッズ </textarea> getElementbyIdでタグの部分を取ってこれる。 <p>↓↓↓ 小さい“つ”が消えた!? ↓↓↓</p> <textarea id=\"tu_output\" cols=\"80\" rows=\"5\"> </textarea> 関数。処理に名前をつける </form>  イベント。ユーザーさんがキーを離したらこの処理をしてね!
    22. まとめ HTMLは、必要な部分にidをつけておく getElementbyIdでタグの部分を取ってこれる。 var output = document.getElementById(\"tu_output\"); 関数。処理に名前をつける output.value=\"もぎゃ\"; イベント。ユーザーさんがキーを離したらこの処理をしてね!
    23. まとめ HTMLは、必要な部分にidをつけておく function update_tu(){ var input = document.getElementById(\"tu_input\"); var output = document.getElementById(\"tu_output\"); var text_in = input.value; var text_out = \"\"; getElementbyIdでタグの部分を取ってこれる。 var i=0; for (i = 0; i < text_in.length; i++) { if( text_in.charAt(i).match(/っ|ッ/) == null ){ 関数。処理に名前をつける text_out += text_in.charAt(i); } } イベント。ユーザーさんがキーを離したらこの処理をしてね! output.value = text_out; }
    24. まとめ HTMLは、必要な部分にidをつけておく <form> <textarea id=\"tu_input\" cols=\"80\" rows=\"5\"\"> ニッポン の ヘッド である 総理 の グッズ </textarea> getElementbyIdでタグの部分を取ってこれる。 <p>↓↓↓ 小さい“つ”が消えた!? ↓↓↓</p> <textarea id=\"tu_output\" cols=\"80\" rows=\"5\" onkeyup=\"update_tu();\"></textarea> 関数。処理に名前をつける </form> イベント。ユーザーさんがキーを離したらこの処理をしてね!
    25. まとめ HTMLは、必要な部分にidをつけておく getElementbyIdでタグの部分を取ってこれる。 関数。処理に名前をつける イベント。ユーザーさんがキーを離したらこの処理をしてね!
    26. ご静聴ありがとうございました

    + mogyamogya, 9 months ago

    custom

    2693 views, 0 favs, 3 embeds more stats

    webteko vol.05 JavaScirptElementarySchool.

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2693
      • 2658 on SlideShare
      • 35 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 2
    Most viewed embeds
    • 30 views on http://blog.mogya.com
    • 4 views on http://mogya.com
    • 1 views on http://74.125.153.132

    more

    All embeds
    • 30 views on http://blog.mogya.com
    • 4 views on http://mogya.com
    • 1 views on http://74.125.153.132

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?