window.open('http://www.imooc.com','_blank','width=600,height=400,top=100,left=0'
2019-09-28
function openWindow(){
var openStr = confirm("是否打开新窗口");
if(openStr == true)
{
var mywin = prompt("请输入网址:","http://www.imooc.com/");
if(mywin)
{
window.open(mywin,'width = 400','height = 500','menubar = no','toolbar = no');
}
}
}
var openStr = confirm("是否打开新窗口");
if(openStr == true)
{
var mywin = prompt("请输入网址:","http://www.imooc.com/");
if(mywin)
{
window.open(mywin,'width = 400','height = 500','menubar = no','toolbar = no');
}
}
}
不显示
<body>
<p id="ee">java</p>
<h2>wrojfdlk</h2>
</body>
<script>
var mydd = document.getElemtenById("ee");
document.write("yiqian:"+mydd.innerHTML);
mydd.innerHTML="script";
document.write("xianzai:"+mydd.innerHTML);
</script>
<body>
<p id="ee">java</p>
<h2>wrojfdlk</h2>
</body>
<script>
var mydd = document.getElemtenById("ee");
document.write("yiqian:"+mydd.innerHTML);
mydd.innerHTML="script";
document.write("xianzai:"+mydd.innerHTML);
</script>
2019-09-24
最新回答 / 慕莱坞6524007
var function nonechar()??????创建函数不需要用var声明,需要调用的函数要写函数名,getElementById这才是通过ID正确的获取节点的代码, onclick="widthchange"调用函数时, 后面的括号不能少
2019-09-24