<script type="text/javascript">
function openWindow(){
if(confirm("是否打开")){
// 通过输入对话框,确定打开的网址,默认为 http://www.imooc.com/
window.open("http://www.imooc.com/",'_blank','width=400px,height=500px,menubar=no,toolbar=no');}
}
function openWindow(){
if(confirm("是否打开")){
// 通过输入对话框,确定打开的网址,默认为 http://www.imooc.com/
window.open("http://www.imooc.com/",'_blank','width=400px,height=500px,menubar=no,toolbar=no');}
}
最新回答 / 黑色丶毛衣
没说还没发现这个问题,我也很好奇!我只知道任何一个对当前页面进行操作的document.write()方法将打开—个新的输出流。它将清除当前页面内容(包括源文档的任何变量或值)。至于你说的保留按钮应该要使用其他方法吧!有请楼下大神来解释下!
2016-05-17
最新回答 / 西风烈95273367049
你给的例程里面 obj变量就是全局变量.我这个例子里面obj_local是局部变量<code><script type="text/javascript"> var obj=document.getElementById("id"); function reset(){ var obj_local="局部变量"; if(confirm("确认初始化吗?")){ obj.style.color="#000"; ...
2016-05-17
一篇给小白看的 JavaScript 引擎指南:http://t.cn/R42u4b9
给 JavaScript 初学者的 ES2015 实战:http://t.cn/R42utgO
作者结合自身总结的前端入门方法:http://t.cn/R42uiSb
给 JavaScript 初学者的 ES2015 实战:http://t.cn/R42utgO
作者结合自身总结的前端入门方法:http://t.cn/R42uiSb
2016-05-17
function openWindow(){
var mymessage=confirm("是否打开新窗口?");
if(mymessage ==true)
{
var myhtml=prompt("请输入你想打开的网页","http://www.imooc.com");
if(myhtml!=null)
{window.open(myhtml,'_blank','width=400px,height=500px,menubar=no,toolbar=no'); }
else{}} }else{} }
var mymessage=confirm("是否打开新窗口?");
if(mymessage ==true)
{
var myhtml=prompt("请输入你想打开的网页","http://www.imooc.com");
if(myhtml!=null)
{window.open(myhtml,'_blank','width=400px,height=500px,menubar=no,toolbar=no'); }
else{}} }else{} }
例如:打开http://www.imooc.com网站,大小为300px * 200px,无菜单,无工具栏,无状态栏,有滚动条窗口:
<script type="text/javascript"> window.open('http://www.imooc.com','_blank','width=300,height=200,menubar=no,toolbar=no, status=no,scrollbars=yes')
</script>
<script type="text/javascript"> window.open('http://www.imooc.com','_blank','width=300,height=200,menubar=no,toolbar=no, status=no,scrollbars=yes')
</script>
2016-05-16
最新回答 / 慕娘9282524
这个 问题 我以前回答过。 主要原因是优先级的问题 mychange.className的优先级要小于mychange.style.height/width等等 所以你想用mychange.className的方法去覆盖mychange.style.height/width 的样式 是不可行的、
2016-05-16