最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
js switch 教程
时间:2009-03-31 编辑:简简单单 来源:一聚教程网
function tybsoso(son){
tnum=son;
var qtext1=document.getElementById('qbtext1').value;
var qtext2=document.getElementById('qbtext2').value;
var qtext3=document.getElementById('qbtext3').value;
var qtext4=document.getElementById('qbtext4').value;
switch (tnum)
{
case '1':
gotourl="http://data.2008.163.com/searchs/index.html?q="+qtext1;
gotourl=encodeURI(gotourl);
break;
case '2':
gotourl="http://data.2008.163.com/searchs/news.html?q="+qtext2;
gotourl=encodeURI(gotourl);
break;
case '3':
gotourl="http://data.2008.163.com/searchs/data.html?q="+qtext3;
gotourl=encodeURI(gotourl);
break;
case '4':
gotourl="http://data.2008.163.com/searchs/image.html?q="+qtext4;
gotourl=encodeURI(gotourl);
break;
}
window.open(gotourl);
}
-
上一个: ajax 入门实例教程
-
下一个: 最好的xmlhttp创建方法
相关文章
- jsp switch语句的用法 06-07
- jsp switch开关语句用法 05-06
- HTML简单购物数量小程序代码展示 10-31
- html canvas实现弹幕功能 10-31
- HTML中空格表示的意义 10-31
- html area标签解读 10-31