日期:2014-05-20  浏览次数:20637 次

简单问题,速战速决
有一个链接,我想点一下展示三四个文本框。再点一下就又隐藏起来了。

------解决方案--------------------
注:在同一个页面展示出来
------解决方案--------------------
<a onclick= "do() " href= "# "> XXXX </a>
<文本框1 id =“a”/>
<文本框2 id = "b " />
<文本框3 id = "c " />

<script>
function()
{
if(a.visible== "false ")
a.visible= "true "
else a.visible== "true "

if(b.visible== "false ")
b.visible= "true "
else b.visible== "true "
if(c.visible== "false ")
c.visible= "true "
else c.visible== "true "
}
</script>

随便写写的!!


------解决方案--------------------
<script language= "javascript ">
function show() {
var d=document.getElementById( "div ");
if (d.style.display== 'none ') {
div.style.display= 'block ';
} else {
div.style.display= 'none ';
}
}
</script>
<a href= "javascript:show() "> 显示/隐藏 </a>
<div id= 'div '>
<input type= "text " name= "A "/>
<input type= "text " name= "B "/>
<input type= "text " name= "C "/>
</div>

------解决方案--------------------
<script language= "javascript ">
function show() {
var d=document.getElementById( "div ");
if (d.style.display== "none ")
div.style.display= " ";
else
div.style.display= 'none ';
}
</script>
<a href= "javascript:show() "> show </a>
<div id= 'div ' style= "display:none ">
<input type= "text "/>
<input type= "text "/>
<input type= "text "/>
</div>
------解决方案--------------------
用javascript :)