0 LIKES LikeUnLike
The idea is that when a user focuses on the text box the 'Google Search' will disappear. This is the HTML:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml1...<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link type="text/css" rel="Stylesheet" href="stylesheets\main.css" /> <script src="script\main.js" type="text/javascript"></script> </head> <body> <form method="get" action="http://www.google.ie/search"> <p> <input id="search" type="text" name="q" size="25" maxlength="255" value="Google Search" onfocus="searchFocus()" onblur="searchBlur()" /> <input type="submit" value="Go" /> </p> </form> </body></html>This is the Javascript file:function searchFocus() { if (search.value='Google Search') search.value=''}function searchBlur() { if (search.value='') search.value='Google Search'}What am I doing wrong?All help appreciated.
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 3 answers.