Created
May 1, 2013 13:39
-
-
Save chikoski/5495315 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <form> | |
| <input type="button" value="A" id="button_a"> | |
| <input type="button" value="B" id="button_b"> | |
| <input type="button" value="C" id="button_c"> | |
| <input type="button" value="D" id="button_d"> | |
| </form> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var word = "こんにちは"; | |
| var button_a, button_b, button_c, button_b; | |
| button_a = document.getElementById("button_a"); | |
| button_b = document.getElementById("button_b"); | |
| button_c = document.getElementById("button_c"); | |
| button_d = document.getElementById("button_d"); | |
| button_a.onclick = function(){ | |
| var word = "こんにちは!こんにちは!"; | |
| alert(word); | |
| }; | |
| button_b.onclick = function(){ | |
| alert(word); | |
| }; | |
| button_c.onclick = function(){ | |
| word = "こんにちは!こんにちは!"; | |
| alert(word); | |
| }; | |
| button_d.onclick = function(){ | |
| alert(word); | |
| word = "こんにちは"; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment