<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
<head>
<title>Untitled</title>
<Script language="javascript">
function fncTest()
{
var temp=document.all.txt.value;
switch (temp) {
case "a":
window.location.href="a.html"
break;
case "b":
window.location.href="b.html"
break;
case "c":
window.location.href="c.html"
break;
default:
alert("No Page");
break;
}}</Script>
</head><body><input type="text" value="" name="txt">
<input type="button" value="ok" name="btn" onclick="fncTest()"></body>
</html>
//是这样的吗?
<head>
<title>Untitled</title>
<Script language="javascript">
function fncTest()
{
var temp=document.all.txt.value;
switch (temp) {
case "a":
window.location.href="a.html"
break;
case "b":
window.location.href="b.html"
break;
case "c":
window.location.href="c.html"
break;
default:
alert("No Page");
break;
}}</Script>
</head><body><input type="text" value="" name="txt">
<input type="button" value="ok" name="btn" onclick="fncTest()"></body>
</html>
//是这样的吗?
<head>
<title>Untitled</title>
<Script language="javascript">
function fncTest()
{
var temp=document.all.txt.value;
switch (temp) {
case "a":
window.open("a.html","a",width="300",height="400");
break;
case "b":
window.open("b.html","b",width="300",height="400");
break;
case "c":
window.open("c.html","c",width="300",height="400");
break;
default:
alert("No Page");
break;
}}</Script>
</head><body><input type="text" value="" name="txt">
<input type="button" value="ok" name="btn" onclick="fncTest()"></body>
</html>//这样?