<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
function kkk(value){
alert($(value).val());
}
$(document).ready(function(){
$("p").click(function(){
$(this).append("<button onClick="kkk(this)" value="添加的按键kkk">添加的按钮</button>")
});
});
</script>
</head>
<body>
<button onClick="kkk(this)" value='cc'>hehe
</button>
<p>如果你点我,我就会消失。</p>
<p>继续点我!</p>
<p>接着点我!</p>
</body>
</html>