html - creating a link to a div -


is possible create link div? line of code:

     output +='<h2><a href=\"link-to-a-website" >' + val.product + '</h2>'; 

i have created rich internet application , need link div within website

yes possible need use id instead of class.

example:

<h2><a href="#targetdiv" >' + val.product + '</a></h2>  <div id="topdiv"> </div> <div id="targetdiv"> </div> 

jsfiddle: https://jsfiddle.net/andrewl32/45o6u4le/2/


the target div on different page/site have specify path correctly.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -