JS的click事件输出html 点击一次就消失?
<html><body>
<script src="jquery.js" type="text/javascript"></script>
<meta charset="utf-8">
<form method="post">
<div>
<span>id: <input type="text" name="id" id="id"/></span>
<span id="insert"></span></div>
<div> <input type="submit" id="btn"/></div>
</form>
</body>
<script type="text/javascript">
$(function(){
$("#btn").click(function(){
val=$("input[name='id']").val();
$("#insert").html(val);
// $("#id").after($newlist);
//alert(val);
});
})
</script>
</html>