Use of textarea for quick code sharing

March 2, 2008 · Print This Article

Sometimes, when you want to build a link empire or a link train, you may want to consider giving your followers’ lives easier by giving them a little spoon-feeding. Like for an instance, I have a very creative logo here that I want your readers to post on their blogs to pester everyone until they notice what you’re saying. You may want to make it easier for them to follow suit. You know, click-copy-paste.

Like this. Click on the text below, it will be highlighted automatically and when embedded on your blog pages, it will display the Kubix Cube logo below with a link to this blog. Press Ctrl+C to copy the highlighted text.

The form uses the textarea HTML tag. And what does the codes inside it do is what we’re going to elaborate next.

1. textarea tag – this creates the entire form containing the codes to display.
2. onClick – this is an javascript behavior wherein the use of “this.select()” attribute will allow the entire text to be highlight on mouse click.
3. readonly – an attribute that prevents the embedded text to be modified
4. the rest are self explanatory.

So here’s the complete codes:

<textarea onClick=”this.select();” style=”width:350px;height:100px;font-family:tahoma;font-size:12px;” readonly><a href=”insert the target link here” title=”insert the mouse over text here“><img border=”0″ src=”insert the image source here“/></a></textarea>

Stumble UponIf you liked "Use of textarea for quick code sharing", you may also be interested in these articles:

« Resize and text-align your Youtube videos · Get your Paypal account verified with Union Bank EON Debit Card »

Comments

Got something to say?