-2

Following in my html code

<a href="javascript:goToDetailOrAQ(&#39;17cfaa70-e135-11e5-9df1-b89d6ab7a50e&#39;,&#39;UMPC&#39;,&#39;&#39;,&#39;ModifyUser&#39;,&#39;&#39;,               &#39;&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;,               &#39;&#39;,&#39;Enquiry&#39;,&#39;36116da87da34441854cf73d7df3c441&#39;,&#39;Y&#39;,&#39;&#39;,&#39;Approved&#39;,&#39;17cfaa70-e135-11e5-b965-a902f3751476&#39;,               &#39;&#39;,&#39;R45OPTIKBENESA04&#39;,&#39;myprofile&#39;,&#39;&#39;,&#39;&#39;)"
class=" infoTip">**03/03/2016 17:13**
<span class="screenReaderOnly">:  </span>
  <span class="screenReaderOnly infoTipText">Details:  Link opens in a new window</span>
</a>

how do i click bold text using javascript

user2314737
  • 27,088
  • 20
  • 102
  • 114
Bibek
  • 11
  • 1

1 Answers1

0

There is 2 ways to do it:
The first one is window.open("url");
window.open("url"); Opens a new tab with the url. The second way is window.location = "url";
That just redirects you to that page

var b = function(){window.location = "http://www.yoururl.com/";};
<h4>Press the italic part to go to <i onclick="b();">yoururl.com</i></h4></body>

Bruce Wayne
  • 11
  • 1
  • 6
  • Another way to do it would also be to programmatically invoke an onclick event: http://stackoverflow.com/a/906565/4670107 – noviewpoint Apr 07 '16 at 06:12