[Javascript] javascript and id's

Flavio Gomes flavio at economisa.com.br
Tue Oct 4 11:56:43 CDT 2005


OT: The "onkeyup" instead of onkeydown would give a better effect on the 
script.

-- 
Flavio Gomes
flavio at economisa.com.br

Flavio Gomes wrote:

>
> Having a form named* "myForm" and an input named "myInput":
> You can access it by "document.myForm.myInput" in the majority of the 
> browsers.
>
> * Yeah, by "named" I mean giving the "name" atribute a value.
>
> <form name=myForm action=processStuff.html>
>  <input type=text name=myInput value="Enter Text" />
>  <input type=submit name=mySubmit value="Go" />
> </form>
>
> <script language="JavaScript">
>  alert(document.myForm.myInput.value);
>
>  document.myForm.myInput.onkeydown = function () 
> {window.status=this.value}
> </script>
>




More information about the Javascript mailing list