js提示用户输入对话框prompt使用代码演示使用JavaScript代码
Click the button to demonstrate the prompt box.
function myFunction()
{
var x;
var person=prompt(“Please enter your name”,”Sharejs.com”);
if (person!=null)
{
x=”Hello ” + person + “! How are you today?”;
document.getElementById(“demo”).innerHTML=x;
}
}