function openWindow(){
var q =confirm("是否打开");
if(q==true)
{
var w=prompt("打开输入1")
if(w==1)
{
window.open(' http://www.imooc.com/','_blank','width=400,height=500,menubar=no,toolbar=no');
}
else(null)
}
else(null)
}
var q =confirm("是否打开");
if(q==true)
{
var w=prompt("打开输入1")
if(w==1)
{
window.open(' http://www.imooc.com/','_blank','width=400,height=500,menubar=no,toolbar=no');
}
else(null)
}
else(null)
}
2016-08-09
//定义"取消设置"的函数
function reSet() {
var isReset = confirm("确定取消设置?");
if (isReset) {
text.style.cssText = "null";
}
}
function reSet() {
var isReset = confirm("确定取消设置?");
if (isReset) {
text.style.cssText = "null";
}
}
//通过id获取节点
var text = document.getElementById("txt");
//定义"改变颜色"的函数
function changeColor() {
text.style.color = "#CCC";
text.style.backgroundColor = "blue";
}
var text = document.getElementById("txt");
//定义"改变颜色"的函数
function changeColor() {
text.style.color = "#CCC";
text.style.backgroundColor = "blue";
}
已采纳回答 / virgil_wilson
document.write("原标题:"+mychar.innerHTML+"")这一句的内容 电脑先输出显示之后 再执行innerHTML改变h2标签中的原来是javascript的内容
2016-08-09
为什么用了innerHTML只是改变了h2标签中的原来是javascript的内容,document.write("原标题:"+mychar.innerHTML+"<br>")这一句的内容却没改变呢?
2016-08-09
已采纳回答 / 大菜鸟666
window.open([URL],[窗口名称],[参数字符串]) 只有三个参数,只能有三个单引号,你的参数字符串分为很多个,就是有很多参数,所以错误
2016-08-08