急:如何控制confirm()确认窗口的字体颜色和大小

jefftam 2005-06-10 06:15:35
急:在应用javascript中,如何控制confirm()确认窗口的字体颜色和大小
请大侠指教!
...全文
4197 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
springwood 2005-06-13
  • 打赏
  • 举报
回复
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>
springwood 2005-06-11
  • 打赏
  • 举报
回复
use showModalDialog to custome your confirm dialog.
suhongwei 2005-06-10
  • 打赏
  • 举报
回复
confirm是浏览器给出的接口

除非让用户使用你自己开发的浏览器否则没法由你定义它的外观
孟子E章 2005-06-10
  • 打赏
  • 举报
回复
和操作系统有关系,还没有见到用js修改的方法

87,992

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧