<script type="text/javascript">
var mychar="hello world!";
document.getElementById("mychar");
document.write("原标题是"+mychar);
mychar.innerHTML="new text";
document.write("修改后为"+mychar);
</script>
var mychar="hello world!";
document.getElementById("mychar");
document.write("原标题是"+mychar);
mychar.innerHTML="new text";
document.write("修改后为"+mychar);
</script>
2016-03-04
function openWindow()
{var warning=confirm("是否填写信息");
if(warning==true)
{var add=prompt("输入网址","http://www.imooc.com/");
if(add!=null)
{window.open(add,'_blank','width=400,height=500,menuber=no,toolbar=no');}
else{alert("什么都没有哦")}}
else{alert("已取消");}
{var warning=confirm("是否填写信息");
if(warning==true)
{var add=prompt("输入网址","http://www.imooc.com/");
if(add!=null)
{window.open(add,'_blank','width=400,height=500,menuber=no,toolbar=no');}
else{alert("什么都没有哦")}}
else{alert("已取消");}
prompt("需要提问的问题!",“可修改的答案!”);//这是一个提问的文本输入确认框!
2016-03-03
最新回答 / 隆先生
<input type="button" value="改变颜色" onclick="a()"/> <input type="button" value="改变宽高" onclick="b()"> <input type="button" value="隐藏内容" onclick="c()"> <input type="button" value="显示内容" onclick="d()"> <input type="...
2016-03-03
//定义"取消设置"的函数
var cancle = function(){
if(confirm("是否确定?")){
document.getElementById("txt").removeAttribute("style");
}
}
var cancle = function(){
if(confirm("是否确定?")){
document.getElementById("txt").removeAttribute("style");
}
}
<script type="text/javascript">
document.write("I");
document.write("love");
document.write("papi酱");
</script>
document.write("I");
document.write("love");
document.write("papi酱");
</script>
2016-03-03
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="tezt/html; charset=utf-8" />
<title>热身</title>
</head>
<>
<html>
<head>
<meta http-equiv="Content-Type" content="tezt/html; charset=utf-8" />
<title>热身</title>
</head>
<>
2016-03-03