Copy to Page | JavaScriptSource

Copy to Page

JavaScriptSource Staff Jul 6, 2007

General

This snippet will copy text entered into a form field and place it directly on the Web page.


Input text here:


When you tab out or click somewhere else on the page, your text will appear below.

Your input:

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: copyToPage.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(11 comments)

it's work but little change, thanks bro for script code

Emir Apr 7, 2009

You could just place it in the head, between script tags or place it in an external filed named "copyToPage.js"

Lee Oct 3, 2007

Hi All,[br /]This script would help me out alot, but I can't figure out what i'm doing wrong. Placed the appropriate code in the Head and Body... not sure where to put the External Code. New to javascript, any suggestions. thanks

steve Sep 14, 2007

I have no knowledge of Javascript, but found this code useful for my purpose. However, I'm trying to have the same text input appear several times in different parts of the same form. I don't really know how to adapt this code to achieve that. Help appreciated.[br /][br /]Thanks

Chris Aug 12, 2007

You need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a].

Lee Aug 7, 2007