这是按钮<a href="javascript:void(0)" onclick="gotopage">转到下一页</a><input type="text" id="page"/>
<script type="text/javascript">
function gotopage()
{
var Val=document.getElementById("page").value;
var Url="";
switch(Val)
{
case "1":Url="
http://www.baidu.com";breck;
case "2":Url="
http://www.google.com.hk";break;
}
window.open(Url);
}
</script>
这个的中心思想是能过不同变量确定要跳转的页面。再用window.open这个函数打开页面。