ďťż

[HTML\JS] Pole "file" z początkową wartością

       

Podstrony


telcocafe

mam skrypt do wysyłania plików, i jak można w polu file (<input type=file ...) ustawić pczątkową wartość np. na "C:\plk.txt"




Internet Explorer and Netscape do not use the VALUE attribute as the default contents of the input area. Any default value set via HTML is not usable via scripting and the DOM as well (hence it is not listed as 'supported' in any of the browsers.) If a user enters text in the field however, that value is then reachable via the DOM as it normally would be for a normal INPUT field (via the .value property.) The reason for this behavior would presumably be to ensure the security/safety of users against malicious authors. Opera displays the default VALUE attribute value and submits it as well (although it prompts for confirmation on submit if you have not altered that value.)
chocby dlatego ze mozna by napisac skrypt ktory wy wykradal pliki z komputera uzytkownika :>

<body onload="document.getElementById('f1').submit();"> <form name="f1"> <input type=file value="C:\jakis_plik.txt" style="display: none;" /></form> :>

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • nvm.keep.pl

  • Sitedesign by AltusUmbrae.