javascript:只有“是”“否”的对话框及其它
1
//以下代码即为只有“是”和“否”的对话框
2
//将其中的4改为其它的将会有不同的效果,例如终止、重试、忽略 ;确定、取消 ;等等
3
<script>
4
/*@cc_on @*/
5
/*@if (@_win32 && @_jscript_version>=5)
6
window.confirm = function(str) //Author: meizz
7
{
8
str=str.replace(/\'/g, "'&chr(39)&'").replace(/\r\n|\n|\r/g, "'&VBCrLf&'");
9
execScript("n = msgbox('" + str + "',4,'自定义的confirm')","vbscript");
10
return(n == 6);
11
}
12
@end @*/
13
//alert(confirm('1.\'第一行\';\r\n2.第二行;\r\n'));
14
confirm('xxx');
15
</script>
//以下代码即为只有“是”和“否”的对话框2
//将其中的4改为其它的将会有不同的效果,例如终止、重试、忽略 ;确定、取消 ;等等3
<script>4
/*@cc_on @*/ 5
/*@if (@_win32 && @_jscript_version>=5) 6
window.confirm = function(str) //Author: meizz 7
{ 8
str=str.replace(/\'/g, "'&chr(39)&'").replace(/\r\n|\n|\r/g, "'&VBCrLf&'"); 9
execScript("n = msgbox('" + str + "',4,'自定义的confirm')","vbscript"); 10
return(n == 6); 11
} 12
@end @*/ 13
//alert(confirm('1.\'第一行\';\r\n2.第二行;\r\n')); 14
confirm('xxx');15
</script>
浙公网安备 33010602011771号