document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <html>
  2.     <head>
  3.         <title>Select Readonly</title>
  4.     <script type="text/javascript" src="http://dev.powelltechs.com/jquery.readonly/www/_other/jquery.min.js"></script>
  5.     <script src="http://dev.powelltechs.com/jquery.readonly/www/trunk/jquery.readonly.js"></script>
  6.         <link rel="stylesheet" href="http://dev.powelltechs.com/jquery.readonly/www/trunk/jquery.readonly.css" type="text/css">
  7.      </head>
  8.      <body>
  9.     <form action="some.html" method="get">
  10.         <input type="submit" value="Click me" />
  11.         <input type="button" value="do Readonly" onClick="addReadonly()" />
  12.         <input type="button" value="not Readonly" onClick="removeReadonly()" />
  13.         <select name="mySelect" id="ex1">
  14.         <option value="One">One</option>
  15.         <option value="Two">Two</option>
  16.     </select>
  17.         <script>
  18.         function addReadonly(){
  19.             $("#ex1").readonly();
  20.         return false;
  21.         }
  22.         function removeReadonly(){
  23.         $("#ex1").readonly(false);
  24.         return false;
  25.         }
  26.     </script>
  27.     </form>
  28. </body>
  29. </html>
');