<!DOCTYPE html>
<html>
<head>
<title>js select跳转代码 - www.jb200.com</title>
</head>
<body>
<div class="selectBox">
<select class="toSlt">
<option href="/pro-161264/">全部分类的商品</option>
<option href="/">普通车床</option>
<option href="/brand/">回转车床</option>
<option href="/">普通车床</option>
<option href="/brand/">回转车床</option>
</select>
</div>
<script type="text/
javascript" src="../js/
jquery-1.11.1.min.js"></script>
<script type="text/javascript">
$(function(){
var $body = $('body');
$body.on('change', 'select:has(option[href])', function(e) {
var _this = $(this),
_href = _this.find('option:selected').attr('href');//获取要跳转的地址
location.href = _href; //跳转
})
})
</script>
</body>
</html>