我现在想改变左边的图片,窗口背景改变,等等,请问怎么做啊 ,有没有相关的资料/
3 个解决方案
#1
自己用 showModalDialog() 模拟去
#2
用showModalDialog()自己做一个啊!
#3
//a.htm
<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
<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
#1
自己用 showModalDialog() 模拟去
#2
用showModalDialog()自己做一个啊!
#3
//a.htm
<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
<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