js 中confirm提示框的按钮确定和取消变为是和否
2个回答
展开全部
下面这个方法可以将按钮替换为“是”,“否”的形式,只支持IE
<script language=javascript>
function window.confirm(str)
{
execScript("n = (msgbox('"+str+"',vbYesNo, '提示')=vbYes)", "vbscript");
return(n);
}
alert(confirm("重载的confirm弹出框"));
</script>
<script language=javascript>
function window.confirm(str)
{
execScript("n = (msgbox('"+str+"',vbYesNo, '提示')=vbYes)", "vbscript");
return(n);
}
alert(confirm("重载的confirm弹出框"));
</script>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
There is no way to change the labels that appear in the buttons of the dialog box (to make them read Yes and No, for example). Therefore, you should take care to phrase your question or message so that OK and Cancel are suitable responses.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询