1. alert("message")
2. var r = confirm("are you sure to continue?");
if(r == true)
{...}
3. var name = prompt("Please enter your name","Harry Potter");
//prompt("sometext","defaultvalue");
if(name != null && name != "")
{...}
1. alert("message")
2. var r = confirm("are you sure to continue?");
if(r == true)
{...}
3. var name = prompt("Please enter your name","Harry Potter");
//prompt("sometext","defaultvalue");
if(name != null && name != "")
{...}
转载于:https://www.cnblogs.com/kevinge/archive/2010/07/06/1772062.html