自定义html标签属性,并通过JQuery获取

来源:互联网 发布:淘宝达人机构申请 编辑:程序博客网 时间:2024/06/04 18:21

标签如下:

   <span webSource="@key">      <input type="checkbox" class="choose_all_web_goods" id="choose_all_web_goods_checkbox" websource="@key">      @key   </span>


获取如下:

alert("网站为:" + $('#choose_all_web_goods_checkbox').attr("websource"));var web = $(this).parent().attr("websource");


0 0
原创粉丝点击