学习代码:http://www.w3school.com.cn/tiy/t.asp?f=js_variables1

<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>无标题文档</title>
<style>
#div1 {width:400px; height:30px; background:#FFC}
#div2 {width:400px; height:30px; background:#CFC}
</style>
<script>
function look1()
{
broszhu=document.getElementById(“div1″).innerHTML=”github.com/broszhu”
}
function look2()
{
broszhu=document.getElementById(“div2″).innerHTML=”taobao.fm”
}
</script>
</head>

<body>
<h1>About Me</h1>
<input type=”button” value=”look me my github” onclick=”look1()” />
<input type=”button” value=”look me my blog” onclick=”look2()” />
<div id=”div1″ />
<p></p>
<div id=”div2″/>
</body>