我的代碼的,點擊了隱藏的那個按鈕以后,點擊顯示的那個按鈕,可是顯示的那個按鈕沒用,誰能幫我解決這個問題
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無標題文檔</title>
<script type="text/javascript">
function hide(){
? var add=document.getElementById("con");
? ? add.style.display="none";
}
function show(){
?var add=document.getElementById("con");
?add.style.display="block";
}
</script>
</head>
<body>
<p id="con">js</p>
<form>
?<input type="button" onclick="hide()" value="隱藏" />
?<input type="button" onclic="show()" value="顯示" />
</form>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無標題文檔</title>
<script type="text/javascript">
function hide(){
? var add=document.getElementById("con");
? ? add.style.display="none";
}
function show(){
?var add=document.getElementById("con");
?add.style.display="block";
}
</script>
</head>
<body>
<p id="con">js</p>
<form>
?<input type="button" onclick="hide()" value="隱藏" />
?<input type="button" onclic="show()" value="顯示" />
</form>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無標題文檔</title>
<script type="text/javascript">
function hide(){
? var add=document.getElementById("con");
? ? add.style.display="none";
}
function show(){
?var add=document.getElementById("con");
?add.style.display="block";
}
</script>
</head>
<body>
<p id="con">js</p>
<form>
?<input type="button" onclick="hide()" value="隱藏" />
?<input type="button" onclic="show()" value="顯示" />
</form>
</body>
</html>
我的代碼的,點擊了隱藏的那個按鈕以后,點擊顯示的那個按鈕,可是顯示的那個按鈕沒用,誰能幫我解決這個問題
2016-04-22
我想說你粗心了,onclick,你少了個k