多按钮切换页面

< script type ="text/javascript" >
function java(){
var java = document.getElementById( " java " );
var dt = document.getElementById( " datastructure " );
var db = document.getElementById( " database " );

java.style.display
= " block " ;
dt.style.display
= " none " ;
db.style.display
= " none " ;
}

function dt(){
var java = document.getElementById( " java " );
var dt = document.getElementById( " datastructure " );
var db = document.getElementById( " database " );

dt.style.display
= " block " ;
java.style.display
= " none " ;
db.style.display
= " none " ;
}

function db(){
var java = document.getElementById( " java " );
var dt = document.getElementById( " datastructure " );
var db = document.getElementById( " database " );

db.style.display
= " block " ;
java.style.display
= " none " ;
dt.style.display
= " none " ;
}
</ script >
< p > &nbsp; </ p >
< p > &nbsp; </ p >
< div >
< form >
< input type ="button" value ="basic" onclick ="java();" /> < input type ="button" value ="servlet" onclick ="dt();" /> < input type ="button" value ="none" onclick ="db();" />
</ form >
</ div >
< div style ="display:block;" id ="java" >
< p > 1 < a href ="http://www.javaworld.com/javaworld/javatips/jw-javatip75.html?page=1" > Usenestedclassesforbetterorganization </ a ></ p >
</ div >
< div style ="display:none;" id ="datastructure" >< a href ="http://www.zz172.com/tech/soft_pro/java-online/12066.html" > 1深入研究Servlet线程安全性问题(好文) </ a >< br />
< p > &nbsp; </ p >
</ div >
< div style ="display:none;" id ="database" > none </ div >

你可能感兴趣的:(按钮)