1 <select name="molsel_oprate" onchange="javascript:var obj = event.target; var index = obj.selectedIndex; $(this).val('default');var linkurl = obj.options[index].getAttribute('linkurl');if(index == 3){location.href=linkurl;}else{window.open(linkurl);}"> 2 3 <option value="default">操作选项</option> 4 <option linkurl="aaa"> <span class="layui-icon" onclick="seledoplmki()">创建</span> 5 </option> 6 7 <option linkurl="bbb"> <span class="layui-icon" >修改</span> 8 </option> 9 10 <option linkurl="ccc" style="text-decoration:none"><span class="layui-icon">删除</span> 11 </option> 12 </select>
这个很简单,相信一看就看懂了,不解释了,做下笔记。