close
在javaScript中 , 若我們想讓使用者輸入value到變數中 ,
我們可以使用Prompt box ,
var name = prompt("Please enter your name:");
document.write("Hello , " + name);
and if you want to initial the variable , we can use:
var name = prompt("Please enter your name" , "Holly");
全站熱搜