Creating Javascript function called ReadName()

Posted by user228390 on Stack Overflow See other posts from Stack Overflow or by user228390
Published on 2010-03-08T18:01:09Z Indexed on 2010/03/08 18:06 UTC
Read the original article Hit count: 133

Filed under:
|
|

Hey guys, I want to create a form which has a text entry box where a user can enter their name and then I want a button as well. But what I want this button to have a function called ReadName() where what will happen is when the user clicks on the button it will come up with a message saying "Hello user name will appear here I have tried my self and but I don't think I am not getting what I want. Any help will be appreciated.

<form>
    <label for="name">Name:/label>
    <input type="text" name="name" id="name"/>
    <input type="text" name="name" onfocus="ReadName()"/>
</form>

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about help