已采纳回答 / qq_六月是你的谎言_0
document.getElementById 是通过ID查询,Object.style.property=new style是获取元素对象
2016-02-17
你的代码window.open("dizhi",'_blank',width='400',height='500',menubar='no',toolbar='no')的语法错误,里面必须有打开窗口的url,修改为window.open("http://www.baidu.com",'_blank',width='400',height='500',menubar='no',toolbar='no')就可以了。
最新回答 / 不劳虎
啊,我知道你代码的问题了1、if(url!=改为if(str!=2、window.open(str,'_blank',width=400px,height=500px,menubar=no,toolbar=no);改为window.open(str,'_blank','width=400px,height=500px,menubar=no,toolbar=no');即参数需要用单引号或双引号括起来;3、还是11行 if(url!=null){改为 if(str!=null){后依然有些问题,需要改为 if...
2016-02-16
document.write("<span style='white-space:pre;'>"+" 1 2 3 "+"</span>");
style='white-space:pre;'表示会保留原文中的空格
style='white-space:pre;'表示会保留原文中的空格
2016-02-16
function openWindow()
{
var i= confirm("是否打开");
if(i==true)
{
var dizhi=prompt("请输入网址","http://www.baidu.com")
window.open("dizhi",'_blank',width='400',height='500',menubar='no',toolbar='no')
}
else{}
}
{
var i= confirm("是否打开");
if(i==true)
{
var dizhi=prompt("请输入网址","http://www.baidu.com")
window.open("dizhi",'_blank',width='400',height='500',menubar='no',toolbar='no')
}
else{}
}
window.open("http://www.imooc.com","_blank",width='600',height='400',top='100',left='0')
2016-02-16
function ocwin(){
var mywin=window.open("http://www.baidu.com");
var mywin2= mywin.confirm("你确定要打开此前窗口吗?");
if(mywin2==true)
{
mywin.close();
alert("已经关闭!")
}
else
{
mywin.open("http://www.baidu.com");
alert("未关闭!")
}
}
var mywin=window.open("http://www.baidu.com");
var mywin2= mywin.confirm("你确定要打开此前窗口吗?");
if(mywin2==true)
{
mywin.close();
alert("已经关闭!")
}
else
{
mywin.open("http://www.baidu.com");
alert("未关闭!")
}
}
2016-02-16