帶搜尋圖示的文字框
阿新 • • 發佈:2019-01-08
1、效果圖
2、HTML 程式碼
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script src="IndusJS/jquery.min.js"></script>
< style type="text/css">
.inputAttr1{
background: url("images/sxmcx.png") no-repeat 265px ;
width: 300px;
height: 41px;
border-radius:5px;
border: 1px solid #999999;
box-shadow: 1px 1px 3px #cccccc;
padding-left: 10px;
margin-right: 10px;
}
.inputAttr2{
width : 255px;
height: 35px;
margin-right:10px;
border:none;
line-height:35px;
}
input,img
{
vertical-align:middle;
}
</style>
<script type="text/javascript">
function search()
{
alert('查詢結果正確');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<input type="text" class="inputAttr1" name="activityUserValue" placeholder="註冊郵箱/使用者名稱"/>
<div style="width:310px;height:38px;border: solid 1px;">
<input type="text" class="inputAttr2" placeholder="專案/企業查詢"/>
<img style="height:36px; cursor:pointer;" onclick="search()" src="images/sxmcx.png" />
</div>
</form>
</body>
</html>
3、搜尋圖示