日期:2014-05-17  浏览次数:20700 次

怎把javascript里alert弹出框的“确定”按钮换成英文?
怎把javascript里alert弹出框的“确定”按钮换成英文?简明一点的

------解决方案--------------------
自己写一张网页为弹出窗口,你想怎么定义就怎么定义,然后调用window.showModalDialog 方法
JScript code
<SCRIPT>
function fnRandom(iModifier){
return parseInt(Math.random()*iModifier);
}
function fnSetValues(){
var iHeight=oForm.oHeight.options[
oForm.oHeight.selectedIndex].text;
if(iHeight.indexOf("Random")>-1){
iHeight=fnRandom(document.body.clientHeight);
}
var sFeatures="dialogHeight: " + iHeight + "px;";
return sFeatures;
}
function fnOpen(){
var sFeatures=fnSetValues();
window.showModalDialog("showModalDialog_target.htm", "",
sFeatures)
}
</SCRIPT>
<FORM NAME=oForm>
Dialog Height <SELECT NAME="oHeight">
<OPTION>-- Random --
<OPTION>150
<OPTION>200
<OPTION>250
<OPTION>300
</SELECT>
Create Modal Dialog Box
<INPUT TYPE="button" VALUE="Push To Create"
onclick="fnOpen()">
</FORM>