您的小提琴似乎正在工作,但是问题是您没有真正将其提交到任何地方。
<script type="text/javascript"> $(document).ready(function() { var timer; $('#yurl).on('keyup', function() { var value = this.value; clearTimeout(timer); timer = setTimeout(function() { //do your submit here $("#ytVideo").submit() alert('submitted:' + value); }, 2000); }); //then include your submit definition. What you want to do once submit is executed $('#ytVideo').submit(function(e){e.preventDefault(); //prevent page refreshvar form = $('#ytVideo').serialize();//submit.php is the page where you submit your form$.post('submit.php', form, function(data){ //do something with the data}); });});</script>


