html:
<a href="你要跳转页面的url" class="btn_a">按钮</a>
CSS:
.btn_a{width:100pxheight:30pxline-height:30pxcolor:#fffbackground-color:#d0af61display:block}
这个是html和JavaScript的基础,其中按钮是写在html中,d出事件写在JavaScript中。具体代码如下JavaScript
function tan(){
alert("HELLO")
}
html
<input type=button value=按钮 onclick=tan() />
在文本框后面直接添加一个按钮,如果版面宽度足够的话,应该就在文本框右面。还有一种比较简单的办法是,先添加一个一行二列的表格,左边的单元格内放文本框,右边的单元格内放按钮,代码:<table width="100%" border="0">
<tr>
<td align="right"><input name="" type="text">
</td>
<td align="left"><input name="" type="button">
</td>
</tr>
</table>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)