下面请跟着图老师小编一起来了解下JavaScript自定义模式对话框,精心挑选的内容希望大家喜欢,不要忘记点个赞哦!
【 tulaoshi.com - Web开发 】
script language=javascript
function openDialogWin()
{
var result = window.showModalDialog("ShowMessage.aspx","","dialogHeight:160px; dialogWidth:300px; status:no; help:no; scroll:no");
//window.show('ShowMessage.aspx', '','height=300, width=400, top=250, left=250, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no','_blank');
if(result == "Yes")
window.alert("You Clicked Yes!");
else if(result == "No")
window.alert("You Clicked No!");
//document.writeln(result);
}
/scriptinput type=button value="按钮" name="BTn" onclick="openDialogWin()" / Response.Write("script language='javascript'");
Response.Write("function confirm(){ window.returnValue='Yes';window.close(); }");
Response.Write("function cancel(){ window.returnValue='No';window.close(); }");
Response.Write("/script");
Response.Write("div align='center'input type='button' value='Yes' onclick='confirm()' /input type='button' value='No' onclick='cancel()' //div");
来源:http://www.tulaoshi.com/n/20160219/1628166.html
看过《JavaScript自定义模式对话框》的人还看了以下文章 更多>>