select下拉列表选中后,跳转至指定页面

1.在当前页面打开新链接

<select onchange="location.href=this.options[this.selectedIndex].value" name="" id="" ></select>

option的value里面要写好新链接的地址

2.在新窗口打开新链接

<select onchange="window.open(this.options[this.selectedIndex].value)" name="select"></select>
<select class="form-control" onchange="location.href = this.options[this.selectedIndex].value">
					  <option selected="">--请选择--</option>
					  <option value="/admin.php/Data/edit/id/122.html">编辑</option>
					  <option value="/admin.php/Data/parameter/id/122/cid/14.html">参数</option>
					  <option value="/admin.php/Data/parameterIntroduction/id/122.html">技术参数配图</option>
					  <option value="/admin.php/Data/productTips/id/122.html">焦点图设置</option>
					  <option value="/admin.php/Data/detailslist/id/122.html">细节展示(M)</option>

					<option value="/admin.php/Data/upField/id/122/field_value/1/field_name/isshow.html">下架</option>
						

					<option value="/admin.php/Data/upField/id/122/field_value/1/field_name/istop.html">取消置顶</option>
						

					  <option value="/admin.php/Data/del/id/122.html">删除</option>
					</select>

你可能感兴趣的:(前端开发)