Home > php教程 > php手册 > jquery控制select只读

jquery控制select只读

WBOY
Release: 2016-06-07 11:45:28
Original
1008 people have browsed it

<script></script><br> <select><br> <option>代码错误</option> <br> <option>用户界面</option> <br> <option>需求变动</option> <br> <option>新增需求</option> <br> <option>设计文档</option> <br> <option>配置相关</option> <br> <option>安装部署</option> <br> <option>安全相关</option> <br> <option>性能压力</option> <br> <option>标准规范</option> <br> <option>测试脚本</option> <br> <option>事务跟踪</option> <br> <option>其他</option> <br> </select><br> <script><br /> $.fn.selectReadOnly=function(){<br /> var tem=$(this).children('option').index($("option:selected"));<br /> $(this).change(function(){<br /> $(this).children('option').eq(tem).attr("selected",true); <br /> });<br /> }<br /> $("select:[readonly='readonly']").selectReadOnly();<br /> </script>

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template