zoukankan      html  css  js  c++  java
  • 最简单jquery.ajax+php例子(对话框显示文本框输入内容),以小见大(初学手记)

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      
    <head>
        
    <title>Hello Jq</title>
        
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
    <script language="javascript" src="js/jquery-1.3.2.js"></script>
        
    <script language="javascript">
            
    function GetUserNameValues(strValue)
            {
                $
    .get("ajax.php", {value:strValue}, function(text){
                    alert(text);
                });
            }
        
    </script>
      
    </head>
      
    <body>
          
    <form name="form" method="POST">
              
    <div style="text-align:center;margin-top:20%;">
              
    <table>
                  
    <tbody>
                      
    <tr>
                          
    <td><input type="text" id="txtName" name="txtName" value="" onblur="return GetUserNameValues(this.value);"/></td>
                      
    </tr>
                  
    </tbody>
              
    </table>
              
    </div>
          
    </form>
      
    </body>
    </html>

    ajax.php

    <?php
    echo $_GET['value'];
    ?>
  • 相关阅读:
    [leetcode-91-Decode Ways]
    [leetcode-72-Edit Distance]
    [leetcode-67-Add Binary]
    [leetcode-137-Single Number II]
    [leetcode-60-Permutation Sequence]
    [leetcode-55-Jump Game]
    [leetcode-18-4Sum]
    [leetcode-15-3Sum]
    [leetcode-47-Permutations II]
    easyui tabs update 强制刷新页面
  • 原文地址:https://www.cnblogs.com/buffer/p/1870529.html
Copyright © 2011-2022 走看看