php 中把放再次放回文本框中,或者 不使用submit 提交

解决方案 »

  1.   

    html页面
    <input name="username" type="text" id="username"/>
    <input type="button" name="button"/>js页面<script>
    $(function(){
        $("input[type='button']").click(function(){
               $.post('a.php',{username:username},function(){
                })
        });})
    </script>服务端处理echo $_POST['username'];
      

  2.   

    网上搜下 ajax异步提交数据
      

  3.   

    实现这个方法太多了Ajax可以。提交后再传回来也可以。