开发者

jQuery get html of clicked link

开发者 https://www.devze.com 2023-04-06 00:05 出处:网络
I need jquery to ge开发者_如何学Got me the html of the clicked link in the code below. Normally, I can get it. But this time the canvas tag is causing me problems. Can anyone help me with this?

I need jquery to ge开发者_如何学Got me the html of the clicked link in the code below. Normally, I can get it. But this time the canvas tag is causing me problems. Can anyone help me with this?

<div height="250" width="250" style="float:relative; margin-bottom: 20px;margin-left: 20px" id="panel" name="panel" class="panel">

<canvas height="250" width="250" class="canvas" name=canvas" id="canvas">

<ul id="Comments" style="font-size: 50%;" class="Reg_Comments">

<li><a mthyear="August-2010" href="#" name="comments01">fast</a></li>
</ul>

</div>


Close off the canvas tag or change your html.

Pretty sure that because you have poorly formatted html, this will be causing your problem.


yup .. canvas tag seems to be not to be closed.
Whereas the html on click should be a simple call -

$('a').click(function(){
    alert($(this).html());
});
0

精彩评论

暂无评论...
验证码 换一张
取 消