<script type="text/javascript"> function clickclear(thisfield, defaulttext, color) { if (thisfield.value == defaulttext) { thisfield.value = ""; if (!color) { color = "000000"; } thisfield.style.color = "#" + color; } } function clickrecall(thisfield, defaulttext, color) { if (thisfield.value == "") { thisfield.value = defaulttext; if (!color) { color = "cccccc"; } thisfield.style.color = "#" + color; } } </script>
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Javascript clear and recall default form value (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Javascript clear and recall ... in javascript forms default value
» Javascript clear and recall ... in javascript forms default value
» appendInputTypeClasses() - I... in css javascript forms attribute selectors inputs
» Check / Uncheck all checkbox... in html javascript forms
» javascript value of selected... in javascript select option value
» Javascript todo-list sorter in javascript
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails