function changecolor()
{
var txt1=document.getElementById("txt");
txt1.style.color="red";
txt1.style.backgroundColor="blue";
}
{
var txt1=document.getElementById("txt");
txt1.style.color="red";
txt1.style.backgroundColor="blue";
}
//定义"改变宽高"的函数
function changeheight()
{
var txt2=document.getElementById("txt");
txt2.style.width="500px";
txt2.style.height="700px";
}
//定义"隐藏内容"的函数
function hidden()
{
var txt3=document.getElementById("txt");
txt3.style.display="none";
}
function changeheight()
{
var txt2=document.getElementById("txt");
txt2.style.width="500px";
txt2.style.height="700px";
}
//定义"隐藏内容"的函数
function hidden()
{
var txt3=document.getElementById("txt");
txt3.style.display="none";
}
//定义"显示内容"的函数
function unhidden()
{
var txt4=document.getElementById("txt");
txt4.style.display="block";
}
//定义"取消设置"的函数
function unall()
{
var txt5=document.getElementById("txt");
txt5.setAttribute('style','');
}
function unhidden()
{
var txt4=document.getElementById("txt");
txt4.style.display="block";
}
//定义"取消设置"的函数
function unall()
{
var txt5=document.getElementById("txt");
txt5.setAttribute('style','');
}
var mychar= document.getElementById("con");
document.write("原标题:"+mychar.innerHTML+"<br>"); //输出原h2标签内容
mychar.innerHTML="Hello world";
document.write("修改后的标题:"+mychar.innerHTML); //输出修改后h2标签内容
</script>
document.write("原标题:"+mychar.innerHTML+"<br>"); //输出原h2标签内容
mychar.innerHTML="Hello world";
document.write("修改后的标题:"+mychar.innerHTML); //输出修改后h2标签内容
</script>
2016-08-17
已采纳回答 / 慕粉3803372
confirm("确定打开新窗口吗?") confirm元素使用时出现一个窗口选择确定和取消,选择‘确定’自动赋予confirm返回值为true,选‘取消’则返回值为false,if()中如果没有限定条件,如confirm=true或者confirm=false,默认的判断条件是if(t),参数t是否为真
2016-08-17
我发现其实大部分的错误集中在各种字母打错以及标点上,列如,";"这是英文符号,“;”这是中文的,中文的不能用的
作为一个新手,我郑重的告诫学到这会儿的,都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评论!!!!!!!!!!!!!!!!!!!都不要看评
2016-08-17