Function in Javascript which works as Placeholder in HTML using javascript.

This is a program which works as a Placeholder in HTML. Placeholder in html displays text in Gray color and as soon as any person starts typing in the text box the text written as “Enter Name” disappears and the text which the user types in comes in black text and if the user deletes all the contents and comes from the text box and leaves the textbox blank, again the text “Enter Name” appears in the text box with the washed out colour. In this program taking the help of JavaScript we have tried to complete the same task using document.getElementById(“txt”).style.color property. On the load event of the page we have called fun_load function which would make the text box carry the text “Enter Name” by default and this text would have gray color. Then on focus event of the text box the function fun_focus would check if the Text box already contains any text other than “Enter Name”. If it contains “Enter Name” that means the user has not typed in any text. So the “Enter Name” would disappear and would allow the user to type in any text. If the user leaves it empty then the text “Enter Name” would again appear in gray color.

 

Author: Gajendra Sharma

Description about Resonance

When a single structural formula of a compound could not satisfactorily explain all the properties of the molecule then two or more hypothetical structure (arrived by redistribution of valence electrons)

Description about ABORTION

Definition-Abortion is the process of partial or complete separation of the products of conception from the uterine wall with or without partial or complete expulsion from the uterine cavity before

How To Write Content For Website

Writing great content is a choice. You can choose to put in the time and work required to create great content and build a prosperous brand. Or you can choose