JavaScript自定义模式对话框
2006-09-19 19:55:01 来源: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);
}
</script><input type=button value="按钮" name="btn" /> 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' /></div>");
http://www.cnblogs.com/maxianghui/archive/2006/09/18/507421.html
Tags:JavaScript 定义 模式
编辑录入:爽爽 [复制链接] [打 印]更多精彩
赞助商链接