如何获取页面使用jquery生成的html标签和里面的值?

解决方案 »

  1.   

    你需要知道标签的ID.然后通过document.getElementById("id")来获取.
    否则,你只能通过 document.getElementsByTageName()来想办法获取
      

  2.   

    (document).ready(function(){
      $("#tb tr").each(function(){
    var text = $(this).children("td:first").text();
    alert("text=="+text);
      });
    });
    select

    $(function(){
        $("select").each(function(){
            $(this).children("option").each(function(){
                alert($(this).text())//每一个option
                alert($(this).text()+"属于id为"+$(this).parent("select").attr("id")+"的select");
            });
        });
    });
      

  3.   

    这么用jquery设置的 就这么获取,$("对象").html("html"); var html=$("对象").html();