1.对话框:
(1).简单的三种弹框:
var name = prompt("What's your name?");
var crorrect = confirm("xxxxx");
alert("xxxxx");
(2). 显示一个包含html格式的模态对话框。
showModalDialog()方法:
参数1:提供对话框html内容的url,
参数2:提供一个值,作为数据内容在window.dailogArguments属性中访问;
参数3:一个非标准的列表,表示方法为name=value,用分号隔开;比如dialogwidth=100, resizable=yes;
必须包含一个按钮来返回returnValue,调用window.close();
e.g
2.错误处理:
window.onerror = function(msg, url, line) {
alert("ERROR: " + msg + "\n" + url + ":" + line);
return true;
}