<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title> Search </title>
<script type= "Text/javascript" src= "Js/jquery.min.js" ></script>
<script type= "Text/javascript" >
function Txtfocus (EL) {
if (El.defaultvalue = = el.value) {el.value = "; el.style.color = ' #000 ';}
}
function Txtblur (EL) {
if (El.value = = ") {el.value = El.defaultvalue; el.style.color = ' #666 ';}
}
</script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("[Name=w]"). Click (function () {
$ ("#txtStr"). Val ($ (this). text ());
$ ("#ss"). Click ();
});
});
</script>
<style type= "Text/css" >
Body {font-family: "Microsoft Jas Black"; font-size:14px;}
. conter {background-color: #fff; margin:30px 100px 30px 100px; border:1px solid #999;}
. wenti {letter-spacing:5px; font-size:16px; font-weight:bold; padding:8px; cursor:pointer;}
. wenti:hover {background-color: #F5FFFA; color: #000;}
. Huida Div {display:none; Background-color: #FFF8DC; letter-spacing:2px; line-height:20px; margin-left:10px; margin-r ight:10px; padding:8px; font-size:12px; }
Input.text, Textarea.textarea {background: #fff; color: #333; border:1px solid #eee; Border-top-color: #999; border-left -color: #999; padding:1px; Vertical-align:middle; height:22px; line-height:22px; }
Input.button {background: #FFA54F repeat-x; padding-top:3px; border:1px solid #708090; width:80px; height:25px; font- size:10pt; Cursor:hand; }
</style>
<body style= "Background-color: #f6f6f6;" >
<form id= "Form1" runat= "Server" >
<div class= "Conter" >
<div class= "Q" >
<div style= "margin:20px" >
<input id= "Txtstr" type= "text" class= "text" value= "input problem keyword" onfocus= "txtfocus (This)" onblur= "Txtblur"/>
<input id= "ss" type= "button" class= "button" value= "Search"/>
</div>
<div style= "margin:10px 0px 10px 20px" > Shortcut tag: <a name= "W" style= "Font-size:12px;color: #f01; Text-decoration:none; Cursor:pointer ">1111</a> <a name= "W" style= "Font-size:12px;color: #f01; Text-decoration:none; Cursor:pointer "> 33 </a> <a name= "W" style= "Font-size:12px;color: #f01; Text-decoration:none; Cursor:pointer ">444444</a> <a name= "W" style= "Font-size:12px;color: #f01; Text-decoration:none; Cursor:pointer "> Custom </a> </div>
</div>
</div>
</form>
</body>
JQuery Click text input search box search