Created
October 31, 2012 06:20
-
-
Save chikoski/3985345 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
<input type="text" id="text1"> | |
<input type="button" value="Click me!" onclick="readTextInput()"> | |
<script> | |
function readTextInput(){ | |
var text = document.getElementById("text1"); | |
var inputValue = text.value; | |
window.alert(inputValue); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment