【发布时间】:2015-10-31 08:27:25
【问题描述】:
我正在使用此代码:
<script type="text/javascript">
window.alert("Click Ok If Over 18");
window.open(
'.html',
'_blank' // <- This is what makes it open in a new window.
);
</script>
我需要添加此代码以在新窗口中打开一个弹出窗口:
<script type='text/javascript' src='address popup'></script>
如果我这样添加:
<script type="text/javascript">
window.alert("Click Ok If Over 18");
window.open(
'address popup',
'_blank' // <- This is what makes it open in a new window.
);
</script>
它没有按预期打开。我只看到文字。
也许是因为我没有使用src:。
我能做什么?
【问题讨论】:
标签: javascript html window hosting alert