admin 发表于 2014-3-8 10:17:47

基于jQuery的select新窗口打开

不多介绍,你懂得。直接上代码:<select name="sheng" id="seo_links">
<option selected="selected">友情链接</option>
<option value="http://www.baidu.com">百度搜索</option>
</select>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/JavaScript">
/*基于jQuery的select新窗口打开*/
if($("#seo_links").length>0){
$("#seo_links").change(function(){
window.open($(this).val());
})
}
</script>
页: [1]
查看完整版本: 基于jQuery的select新窗口打开