亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

jQuery實(shí)現(xiàn)簡單評論功能

 更新時(shí)間:2020年08月19日 11:54:47   作者:hemingyang97  
這篇文章主要為大家詳細(xì)介紹了jQuery實(shí)現(xiàn)簡單評論功能,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了jQuery實(shí)現(xiàn)簡單評論功能的具體代碼,供大家參考,具體內(nèi)容如下

例子:

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title></title>
  <meta charset="utf-8" />
  <style type="text/css">
    #tab {
    border-right:1px solid #000000;
    border-bottom:1px solid #000000;
    width:200px;
    }
    #tab td{
      border-left:1px solid #000000;
      border-top:1px solid #000000;
    }
  </style>
  <script src="../scripts/jquery-1.3.1.js"></script>
  <script>
    $(function () {
      $("#Button1").click(function () {
        //獲取昵稱
        var name = $("#name").val();
        //獲取內(nèi)容
        var next = $("#next").val();
        //添加
        var ul_li = $(" <tr><td>" + name + "</td><td>" + next + "</td>");
        var b = $("#tab");
        b.append(ul_li);
      });
    });
  </script>
</head>
<body>
  <div>
    <table id="tab">
    <tr><td>昵稱</td><td>內(nèi)容</td>
    </table>
    昵稱:<input id="name" type="text" />
    內(nèi)容:<input id="next" type="text" />
    <input id="Button1" type="button" value="評論" />
  </div>
</body>
</html>

效果:

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論