Zi 字媒體
2017-07-25T20:27:27+00:00
JS基本按鈕呼叫彈出視窗-03(按鈕呼叫js單純輸入對話合dialog-prompt)
資料來源:http://easonyo.pixnet.net/blog/post/25035463-javascript-彈出小視窗
Click the button to demonstrate the prompt box.
Try it
function myFunction() {
var person = prompt(“Please enter your name”, “Harry Potter”);
if (person != null) {
document.getElementById(“demo”).innerHTML =
“Hello ” + person + “! How are you today?”;
}
}
寫了
5860316篇文章,獲得
23313次喜歡