您可以将窗口提示上的“确定”和“取消”按钮更改为一个“关闭”按钮吗?为了我的目的,我喜欢window.prompt显示我的链接,并且很容易复制,因为它已经突出显示。这是我的代码:
function sLink()
{
var ctr = map.getCenter();
var text = "http..../viewer-emailtest.shtml?lat="+ ctr.lat().toString() + "&lng=" + ctr.lng().toString() + "&z=" + map.getZoom().toString()
window.prompt("Copy the highlighted link below and paste into your email program to share:", text);
}
谢谢!
答案 0 :(得分:-2)
根据OP评论,在jquery中回答
jQuery.alerts.okButton = 'Continue';
jQuery.alerts.cancelButton = 'Cancel';
jQuery.alerts.confirm("are you sure to do ?","Confirm",function(result){
if(result){
alert("you selected continue");
}else{
alert("you selected cancel");
}
});