http://files.cnblogs.com/files/xsmhero/jquery.livequery.js
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js'></script> <script type="text/javascript" src="jquery.livequery.js"></script>
<input type="button" id="create" value="點選這裡" />
<div id="msg"></div> <script type="text/javascript">
function checkName(id){
alert('驗證NAME');
} $(function(){ $("#create").click(function(){ var vv ="<input type=\"text\" id="name" name=\"name\" onblur=\"checkName('name')\" />"); $("#msg").html(v);
}); $("#name").livequery('blur',function(){ alert('繫結了單擊事件');
checkName($(this).attr("id"));
}); }); </script>
<input type="button" id="create" value="點選這裡" />