<input type="button" value="改变颜色" onClick="changeColor()">
<input type="button" value="改变宽高" onClick="changeH()">
<input type="button" value="隐藏内容" onClick="non()">
<input type="button" value="显示内容" onClick="dis()">
<input type="button" value="取消设置" onClick="reSet()">
</form>
<input type="button" value="改变宽高" onClick="changeH()">
<input type="button" value="隐藏内容" onClick="non()">
<input type="button" value="显示内容" onClick="dis()">
<input type="button" value="取消设置" onClick="reSet()">
</form>
代码没问题,窗口试过了就是不行
function openWindow(){
var mywin=confirm("请问是否要打开新的窗口?");
if(mywin==true)
{
var mp=prompt("输入将要打开的网址","http://www.imooc.com/");
if(mp!=null){
window.open(mp,'_blank','toolbar=no,menubar=no','width=400px,height=500px');
}
}
}
function openWindow(){
var mywin=confirm("请问是否要打开新的窗口?");
if(mywin==true)
{
var mp=prompt("输入将要打开的网址","http://www.imooc.com/");
if(mp!=null){
window.open(mp,'_blank','toolbar=no,menubar=no','width=400px,height=500px');
}
}
}
function openWindow(){
var mywin=confirm("请问是否要打开新的窗口?");
if(mywin==true)
{
var mp=prompt("输入将要打开的网址","http://www.imooc.com/");
if(mp!==null){
window.open(mp,'_blank','toolbar=no,menubar=no','width=400px,height=500px');
}
}
}
var mywin=confirm("请问是否要打开新的窗口?");
if(mywin==true)
{
var mp=prompt("输入将要打开的网址","http://www.imooc.com/");
if(mp!==null){
window.open(mp,'_blank','toolbar=no,menubar=no','width=400px,height=500px');
}
}
}
已采纳回答 / 木子舟义
function set() { if (confirm('是否恢复默认设置?')) { txt.removeAttribute("style"); }}这样写
2015-12-06
document.getElementById(“id”) 这条语句获取的是元素,包含开始标签到结束标签所有内容。想要输出元素内容需要在其后尾使用.innerHTML /*innerHTML看它的英文单词也可以明白就是里面的字符按html标记的语言格式取出来*/
2015-12-06