Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Select Readonly</title>
- <script type="text/javascript" src="http://dev.powelltechs.com/jquery.readonly/www/_other/jquery.min.js"></script>
- <script src="http://dev.powelltechs.com/jquery.readonly/www/trunk/jquery.readonly.js"></script>
- <link rel="stylesheet" href="http://dev.powelltechs.com/jquery.readonly/www/trunk/jquery.readonly.css" type="text/css">
- </head>
- <body>
- <form action="some.html" method="get">
- <input type="submit" value="Click me" />
- <input type="button" value="do Readonly" onClick="addReadonly()" />
- <input type="button" value="not Readonly" onClick="removeReadonly()" />
- <select name="mySelect" id="ex1">
- <option value="One">One</option>
- <option value="Two">Two</option>
- </select>
- <script>
- function addReadonly(){
- $("#ex1").readonly();
- return false;
- }
- function removeReadonly(){
- $("#ex1").readonly(false);
- return false;
- }
- </script>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement