Javascripts > Javascript Forms > Field Clear Script
Script Title: Field Clear Script
Description: This script clears a text box when it is clicked on.
Example: Available
Credit: Script created by Website Abstraction
Copy the following code into your <HEAD></HEAD> tags.<script language="Javascript"> <!-- //This credit must stay intact //Script by http://www.java-Scripts.net and http://wsabstract.com function doClear(theText) { if (theText.value == theText.defaultValue) { theText.value = "" } } //--> </script>
Copy the following code between the <BODY></BODY> tags of your html page.<form> <input type="text" size=15 value="Enter name" onFocus="doClear(this)"> </form>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email