undefined error in jquery
I get here as x undefined error. In my tr tag I have used this code (in a.php)开发者_运维知识库:
echo "<tr data-x'some php value'>";
In b.php I'm using code like this:
window.location = 'c.php?x=' + $(this).data('x');
You should use data(key) when you have put the information with data(key, value). Use attr(key) in this case: "window.location = 'c.php?x=' + $(this).attr('x');"
加载中,请稍侯......
精彩评论