自己用 showModalDialog() 模拟去
解决方案 »
- 求新浪微薄JS解析
- 邮箱、论坛之类的富文本编辑框如何实现的?
- 可恶的浏览器兼容!!!!!鄙视IE,鄙视FF
- 请教显示问题
- 单选钮控制文本框
- 怎样去掉浏览器最大和最小化按钮???急!
- 打印:document.execCommand('print','true','true')的使用?
- 新手在此,请指教 :)
- 怎样让一个窗口一出来就是没有状态栏、菜单栏....
- 关于刷新的问题????????????????????????????????????????????????????????????????????????????????????????????
- 急求助:为什么Datepicker(calendar.js)在我的IIS中不能使阿(静态页面可以显示)
- 关于取得cookie值的问题,谁能帮帮我啊,急啊,在线等!!!!
<script language="JavaScript">
<!--
function Alert(strText){
var pWin=window.showModalDialog("b.htm",strText,"dialogHeight:116px; dialogWidth:232px; help: No; resizable: no; status: No; scroll:no; dialogTop:"+(screen.height-116)/2+"px; dialogLeft:"+(screen.width-232)/2+"px;");
}
Alert("用户名非法!");
//-->
</script>// b.htm
<html>
<head>
<style type="text/css">
body{ }
td,input{ font-size:12px}
</style>
<script language="JavaScript">
<!--
var str = window.dialogArguments;
function doSure(){
if(txtPwd.value==""){
alert("密码不能为空!");
txtPwd.focus();
return;
}
window.returnValue=txtPwd.value;
window.close();
}function doOk(){
window.returnValue="";
window.close();}
//-->
</script>
<body style="background-color:buttonface; margin:0" >
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
<tr height="65%">
<td width="25%" align="center" valign="center"><img src="warning.gif" style="width:32px; height:32px"></td>
<td valign="middle">
<script language="JavaScript">
<!--
document.write(str);
//-->
</script>
</td>
</tr>
<tr height="35%">
<td colspan="2" align="center" valign="top">
<input type="button" id="btnOk" value=" 确定 " onclick="doOk()">
</td>
</tr>
</table>
</body>
<script language="JavaScript">
<!--
document.onclick=function (){
document.getElementById("btnOk").focus();
}
document.body.oncontextmenu=function (){
document.getElementById("btnOk").focus();
}
//-->
</script>
<html>// warning.gif :C:\WINDOWS\PCHealth\HelpCtr\System\images