JQuery 给A标签绑定点击事件问题
$("a[href*='/product']").each(function(i){ var href = $(this).attr("href"); var id = href.substring(href.indexOf("giftview")+8, href.indexOf(".html")); $(this).bind('click',createIndex('1',id)); });
$(document).on('click', 'a[href*="/product"]', function(){ var href = $(this).attr("href"); createIndex('1',href.substring(href.indexOf("giftview")+8, href.indexOf(".html")));});