Wuu Posted June 21, 2009 Report Share Posted June 21, 2009 <div id="login"> <form name="login_rem"> <input id="login_rem1" class="login" type="text" value=""/> <input id="login_rem2" class="password" type="password" value=""/> </form> <script type="text/javascript"> document.login_rem.login_rem1.value = ""; document.login_rem.login_rem2.value = ""; </script> </div> Kā iztukšot html formas input lauku? Quote Link to comment Share on other sites More sharing options...
0 bubu Posted June 21, 2009 Report Share Posted June 21, 2009 document.getElementById("login_rem1").value = ""; Ja lieto kādu JS freimworku, tad visticamāk strādās arī šis: $("login_rem1").value = ""; Quote Link to comment Share on other sites More sharing options...
0 Wuu Posted June 21, 2009 Author Report Share Posted June 21, 2009 (edited) Tur jau tā lieta ka tā nestrādā. Ja ielieku <form> tāgos tad nestrādā ,bez <form> strādā. Kā draugos tā parole tiek noņemta? Edited June 21, 2009 by Wuu Quote Link to comment Share on other sites More sharing options...
0 bubu Posted June 21, 2009 Report Share Posted June 21, 2009 Es tev neticu. Tas strādā 100% Varbūt tu domāji prasīt kā novākt formu automātisku aizpildīšanu, ko browseros var ieslēgt? Tad pasērčo gūglē "turn off form autocomplete". draugos formas laukiem ir random name vārds, tb katreiz citādāks, tāpēc browseris to "neatcerās" (īstenībā tas atcerās, tik katreiz ar citu vārdu, tāpēc lietotajam izskatās, ka neatcerās). Quote Link to comment Share on other sites More sharing options...
0 Wuu Posted June 21, 2009 Author Report Share Posted June 21, 2009 bubu tiešām nestrādā :( Es pats nesaprotu kāpēc! Kaut kas nav kārtībā ar to formu uz IE submit nestrādā. Quote Link to comment Share on other sites More sharing options...
0 rATRIJS Posted June 21, 2009 Report Share Posted June 21, 2009 <form method="get" action="script.php" name="myForm" onsubmit="clearPass()"> <input type="password" name="pass" id="pass" /> <input type="submit" name="sub" value="Submit" /> </form> <script type="text/javascript"> function clearPass() { document.myForm.submit(); document.getElementById("pass").value = ""; //tik kāda jēga, jo lapa tāpat pārlādēsies } </script> Quote Link to comment Share on other sites More sharing options...
0 bubu Posted June 21, 2009 Report Share Posted June 21, 2009 bubu tiešām nestrādā :( Nemānies. Viss strādā - iekopē šo tukša html failiņā un pārliecinies pats :) <html><body> <form name="login_rem"> <input id="login_rem1" class="login" type="text" value="asdf"/> <input id="login_rem2" class="password" type="password" value="ghijk"/> </form> <script type="text/javascript"> document.getElementById("login_rem1").value = ""; document.getElementById("login_rem2").value = ""; </script> </body></html> Quote Link to comment Share on other sites More sharing options...
0 endrju Posted June 21, 2009 Report Share Posted June 21, 2009 Ko vispār var ņemties ar tādiem "nestrādā"? Ciet topiku un miers. Ne viņš precīzu kodu iedeva, kas nestrādā, ne acimredzot ir lasījis kaut vienu atbildi uz savu jautājumu, jo piedāvātie varianti nu kā vēl strādā. Nervus tikai bendē. Quote Link to comment Share on other sites More sharing options...
0 Wuu Posted June 22, 2009 Author Report Share Posted June 22, 2009 Nē nestrādā plikā lapā strādā kad ielieku savā nestrādā. Šis nevar būt vainīgs? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Quote Link to comment Share on other sites More sharing options...
0 bubu Posted June 22, 2009 Report Share Posted June 22, 2009 Pieliec "plikai lapai" klāt šo rindiņu un pārbaudi. Quote Link to comment Share on other sites More sharing options...
0 Wuu Posted June 22, 2009 Author Report Share Posted June 22, 2009 pārcēlu uz jaunu domainu viss strādā, īsāk sakot šis variants neder. Izmantojam autocomplete="off" ,bet nestrādā operā uz IE un FF iet... Quote Link to comment Share on other sites More sharing options...
Question
Wuu
Kā iztukšot html formas input lauku?
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.