Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1556 How can I ask the user their name and then display it on the page?

irt.org | Knowledge Base | JavaScript | Misc | Q1556 [ previous next ]

Q1556 How can I ask the user their name and then display it on the page?

Try:

<script language="JavaScript"><!--
document.write('Hello ' + prompt('What is your name','stranger'));
//--><script>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.