localhero Posted June 9, 2007 Report Share Posted June 9, 2007 (edited) Ka lai dabu ka INPUT value sakuma ir disableta ieklikskinot eneiblojas un var rakstit un kad tiek nospiests citur(onblur) teksts atkal disablejas. Ko es daru nepareizi ? <html> <head> <script type="text/javascript"> function ieslegt() { document.getElementById("shuuna").disabled=false; } function izslegt() { document.getElementById("shuuna").disabled=true; } </script> </head> <body> <form> <input type="text" value="raksti un spied" id="shuuna" onblur="izslegt()" onclick="ieslegt()"/> </form> </body> </html> Edited June 10, 2007 by localhero Link to comment Share on other sites More sharing options...
bubu Posted June 9, 2007 Report Share Posted June 9, 2007 [ code ] nevis [ codebox ] Kautkādā dīvaina izpratne tev par disabled nozīmi. Disabled būtība ir tāda, ka input ir diseblots - uz tā pat uzklikšķināt nevar! Ja tu gribi tikai izskatu nomainīt, tad maini to ar css stilu/klasi. Link to comment Share on other sites More sharing options...
Exzo Posted June 10, 2007 Report Share Posted June 10, 2007 (edited) Disablēts formas lauks nemaz netiks nosūtīts pie submita. Pie tam labāk nevis onclick="ieslegt()", bet onfocus="ieslegt()", jo pa formu var pārvietoties arī ar TAB Edited June 10, 2007 by Exzo Link to comment Share on other sites More sharing options...
Recommended Posts