开发者

how to add different Href and onCick in ANCHOR TAG for a Ajaxed based website?

I am developing a Ajax based web application.I want to add HREF and OnClick, both to the anchor tag.

This I want to do because of 2 reasons,

  1. To keep the web application SEO friendly.'
  2. Secondly, if user does a "left click event" in that case I want to call AJAX query and in case of "right click event", I want to open a page in new TAB or Window.

I was trying following code but its not working.

<A href="http://www.website.com/" 开发者_StackOverflow中文版onClick="alert("right click event fired"); return false;">stuff</A>

My question is, Is it possible to achieve case?


this might work

  <A href="http://www.website.com/" onClick="alert('right click event fired');return false;">stuff</A>

the double quotes were getting closed in the middle..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜