TextBox里面放一个Button该怎么实现
展开全部
可以用定位来做啊,
style:
.search { position:relative; width: 462px; }
.search .searchText { border: 1px solid #ddd; width: 346px; line-height: 32px; height: 32px; padding: 0 5px; color: #333; }
.search .searchButton { position:absolute; right:50px; background: url(../images/sliced.gif) -251px 0 no-repeat; width: 80px; height: 32px; text-indent: -9999px; border:none; }
html:
<div class="search fl">
<form action="#">
<input class="searchText" type="text" value="请输入搜索关键字" onfocus="if(this.value=='请输入搜索关键字')this.value=''" onblur="if(this.value=='')this.value='请输入搜索关键字'"/>
<input class="searchButton" type="button" value="搜索" />
</form>
<div class="clear"></div>
</div>
style:
.search { position:relative; width: 462px; }
.search .searchText { border: 1px solid #ddd; width: 346px; line-height: 32px; height: 32px; padding: 0 5px; color: #333; }
.search .searchButton { position:absolute; right:50px; background: url(../images/sliced.gif) -251px 0 no-repeat; width: 80px; height: 32px; text-indent: -9999px; border:none; }
html:
<div class="search fl">
<form action="#">
<input class="searchText" type="text" value="请输入搜索关键字" onfocus="if(this.value=='请输入搜索关键字')this.value=''" onblur="if(this.value=='')this.value='请输入搜索关键字'"/>
<input class="searchButton" type="button" value="搜索" />
</form>
<div class="clear"></div>
</div>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询