开发者

How to wrap up my link with javascript onclick?

I have this link

<div class="new-div" ><a href="<?php the_permalink(); ?>"><?php the_title(); ?>

In this case user has to press on the title to get the link and I want also to wrap up div class with the link. Tried several variants. I think there should be a 开发者_Go百科solution with javascript onclick function, but do not know actually how to wrap it up. Thank you for your help.


<div class="new-div" onclick="location.href='<?php the_permalink(); ?>'"><a href="<?php the_permalink(); ?>"><?php the_title(); ?>  
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜