急:如何控制confirm()确认窗口的字体颜色和大小 confirm是浏览器给出的接口除非让用户使用你自己开发的浏览器否则没法由你定义它的外观 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 use showModalDialog to custome your confirm dialog. page1:<HTML><HEAD><TITLE> New Document </TITLE></HEAD><BODY><SCRIPT LANGUAGE="JavaScript"><!--function test() { var win = window.showModalDialog("customDialogForm.html","win","dialogWidth:220px;dialogHeight:130px;help:no;status:no;name:test"); if (win) { alert("Hello World!"); } else { alert("Go to hell!"); } } function testAlert() { var win = window.showModelessDialog("customDialogFormAlert.html","win","dialogWidth:220px;dialogHeight:130px;help:no;status:no;name:test"); if (win) { alert("test"); } } function testAlert1() { var win = window.showModalDialog("customDialogForm2.html","win","dialogWidth:220px;dialogHeight:130px;help:no;status:no;name:test"); if (win==true) { alert("Hello World!"); } else if(win==false) { alert("Go to hell!"); } else { return; } }//--></SCRIPT><FORM METHOD=POST ACTION=""><input type=button value="test Confirm" onclick="test()"><br><br><br><input type=button value="test alert" onclick="testAlert()"><br><br><br><input type=button value="Three checks" onclick="testAlert1()"><br><br><br></FORM></BODY></HTML>page2:<HTML><HEAD><TITLE> Dialogue </TITLE><SCRIPT LANGUAGE="JavaScript"><!--function doYes() { window.returnValue = true; window.close();}function doNo() { window.returnValue = false; window.close();}//--></SCRIPT></HEAD><BODY style="background-color:#d8d8d0"><FORM METHOD=POST ><table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td colspan="5" align="center">Are you sure to quit? </td> </tr> <tr> <td> </td> <td width="15%"> </td> <td width="7%"> </td> <td width="16%"> </td> <td> </td> </tr> <tr> <td align="right"> </td> <td align="right"><INPUT name="button2" type=button style="width:50;cursor:hand;BORDER-RIGHT: #000000 3px solid; BORDER-TOP: #ffffff 3px solid; BORDER-LEFT: #ffffff 3px solid; COLOR: #000080; BORDER-BOTTOM: #000000 3px solid; BACKGROUND-COLOR: #d8d8d0;" value="Yes" onclick="doYes()"></td> <td align="left"> </td> <td align="left"><INPUT name="button" type=button style="width:50; cursor:hand;BORDER-RIGHT: #000000 3px solid; BORDER-TOP: #ffffff 3px solid; BORDER-LEFT: #ffffff 3px solid; COLOR: #000080; BORDER-BOTTOM: #000000 3px solid; BACKGROUND-COLOR: #d8d8d0;" value="No" onclick="doNo()"></td> <td align="left"> </td> </tr></table></FORM></BODY></HTML> 找到javascript:void(0);对应的链接或程序 js IE6,IE7下报expected ":" 请教这个正则表达式如何写? 各位过来看一下,DATAGRID的JS问题 javascript常用函数 50分 求 JS 增加表格的元素(增加行列已经实现) 关于Form中action的写法 帮我把一个vbscript函数转化为javascript函数,在线等~~~~~ 还是这个问题,难道纯用客户端的技术解决不了吗?在线讨论,急!!! 如何实现页面定时刷新,功能同与于ie的f5?? 怎样隐藏<SELECT>中的一个<OPTION> ? getElementById的问题
<HEAD>
<TITLE> New Document </TITLE>
</HEAD><BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
function test() {
var win = window.showModalDialog("customDialogForm.html","win","dialogWidth:220px;dialogHeight:130px;help:no;status:no;name:test");
if (win) {
alert("Hello World!");
} else {
alert("Go to hell!");
}
}
function testAlert() {
var win = window.showModelessDialog("customDialogFormAlert.html","win","dialogWidth:220px;dialogHeight:130px;help:no;status:no;name:test");
if (win) {
alert("test");
}
}
function testAlert1() {
var win = window.showModalDialog("customDialogForm2.html","win","dialogWidth:220px;dialogHeight:130px;help:no;status:no;name:test");
if (win==true) {
alert("Hello World!");
} else if(win==false) {
alert("Go to hell!");
} else {
return;
}
}
//-->
</SCRIPT><FORM METHOD=POST ACTION="">
<input type=button value="test Confirm" onclick="test()"><br><br><br>
<input type=button value="test alert" onclick="testAlert()"><br><br><br>
<input type=button value="Three checks" onclick="testAlert1()"><br><br><br>
</FORM>
</BODY>
</HTML>
page2:
<HTML>
<HEAD>
<TITLE> Dialogue </TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function doYes() {
window.returnValue = true;
window.close();
}
function doNo() {
window.returnValue = false;
window.close();
}
//-->
</SCRIPT></HEAD><BODY style="background-color:#d8d8d0">
<FORM METHOD=POST >
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td colspan="5" align="center">Are you sure to quit? </td>
</tr>
<tr>
<td> </td>
<td width="15%"> </td>
<td width="7%"> </td>
<td width="16%"> </td>
<td> </td>
</tr>
<tr>
<td align="right"> </td>
<td align="right"><INPUT name="button2" type=button style="width:50;cursor:hand;BORDER-RIGHT: #000000 3px solid; BORDER-TOP: #ffffff 3px solid; BORDER-LEFT: #ffffff 3px solid; COLOR: #000080; BORDER-BOTTOM: #000000 3px solid; BACKGROUND-COLOR: #d8d8d0;" value="Yes" onclick="doYes()"></td>
<td align="left"> </td>
<td align="left"><INPUT name="button" type=button style="width:50; cursor:hand;BORDER-RIGHT: #000000 3px solid; BORDER-TOP: #ffffff 3px solid; BORDER-LEFT: #ffffff 3px solid; COLOR: #000080; BORDER-BOTTOM: #000000 3px solid; BACKGROUND-COLOR: #d8d8d0;" value="No" onclick="doNo()"></td>
<td align="left"> </td>
</tr>
</table>
</FORM>
</BODY>
</HTML>