最赞回答 / 慕九州3204222
因为new本身是关键字 Javascript 的保留关键字不可以用作变量、标签或者函数名,你随便换个其他变量名就可以正常打开了break case catch continue default delete do else finally for function if in instanceof new return switch this throw try var void while with 等
2019-07-07
最新回答 / weixin_慕丝4411178
<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>window.open</title><script type="text/javascript"> function xin(){ var kou = confirm("要打开此网页吗?"); if(kou==tru...
2019-07-05
最新回答 / 是桃子精呀
问题已解决……把总结发给大家参考下:总结:1、confirm返回值为true 或 false;2、prompt返回值为文本框内容 或 null;3、window.open(url,'_blank','width=400px,height=500px,left=200px,menubar=no,toolbar=no'); 处为url(即http://www.imooc.com/),不能加引号,负责则为字符串,无法打开。4、花括号要一一对应,不要打错!否则无法体现效果!
2019-06-29