<html>
<head>
<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/>
<title>JavaScript課程</title>
<style?type="text/css">
body{font-size:12px;}
#txt{
height:400px;
width:600px;
border:#333?solid?1px;
padding:5px;
}
p{
line-height:18px;
text-indent:2em;
}
</style>
</head>
<body>
<h2?id="con">JavaScript課程</h2>
<div?id="txt">
<h5>JavaScript為網(wǎng)頁添加動態(tài)效果并實現(xiàn)與用戶的交互功能。</h5>
<ol>
<li>JavaScript入門篇,讓不懂js的你,快速了解JS。</li>
<li>JavaScript進階篇,讓你掌握JS的基礎(chǔ)語法、函數(shù)、數(shù)組、事件、內(nèi)置對象、BOM瀏覽器、DPM操作。</li>
<li>學完以上兩門基礎(chǔ)課后,在深入學習JavaScript的變量作用域、事件、對象、運動、cookie、正則表達式、ajax等課程。</li>
</ol>
</div>
<form>
<!--?當點擊相應(yīng)按鈕,執(zhí)行相應(yīng)時間?-->
<input?type="button"?value="改變顏色"?onclick="Ccolor()"/>
<input?type="button"?value="改變寬高"?onclick="CwdithAndheigt()"/>
<input?type="button"?value="隱藏內(nèi)容"?onclick="HideContent()"/>
<input?type="button"?value="顯示內(nèi)容"?onclick="ShowContent()"/>
<input?type="button"?value="取消設(shè)置"?onclick="CannelSeting()"/>
</form>
<script>
//定義改變顏色的函數(shù)
function?Ccolor(){
var?mychar=getElementById("txt");
mychar.style.color="red";
mychar.style.backgroundColor="bule";
}
//定義改變寬高的函數(shù)
function?CwdithAndheigt(){
var?mychar=getElementById("txt");
mychar.style.wdith="100px";
mychar.style.height="300px";
}
//定義隱藏內(nèi)容的函數(shù)
function?HideContent(){
var?mychar=getElementById("txt");
var?mychar=getElementById("txt");
mychar.style.display=none;
}
//顯示內(nèi)容的函數(shù)
function?ShowContent(){
var?mychar=getElementById("txt");
mychar.style.display=block;
}
//定義取消設(shè)置的函數(shù)
function?CannelSeting(){
if(confirm("是否恢復(fù)之前的設(shè)置")==true){
}
}
</script>
</body>
</html>
這個按鈕為什么沒有反饋,哪里出了問題??
慕俠9125118
2016-09-12 21:56:19