日期:2014-05-16 浏览次数:20395 次
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>测试</title>
<script type="text/javascript" src="jquery-1.3.2.min">
$(document).ready(function()
{
$("#btn1").click
(
function()
{
$("#btn1").after("<input type=\"text\" name=\"username\" value=\"用户名\" /> ");
$("#btn3").remove();
}
)
$("#btn2").click
(
function()
{
$("#btn2").after("<input type=\"text\" name=\"password\" value=\"密码\" /> ");
$("#btn3").remove();
}
)
})
function test(){
alert('ok');
}
</script>
</head>
<body>
<form action="" method="post">
<button id="btn1" >登录</button> <br/>
<button id="btn2">注册</button> <br/>
<button id="btn3">消除</button> <br/>
</form>
</body>
</html>