0

I need to add a hyperlink to a tag and the following is what I did.

<div id="dialog" style="display: none">
    The new site is started, and old site is gone
     <a href='www.google.com' id='dialog'>Google</a>
</div>

I added the code to a "Script Editor" webpart, however,i found there is an issue that the link is changed to

"https://teams.connect.te.com/sites/PCINDIRECT/SitePages/www.google.com"

"https://teams.connect.te.com/sites/PCINDIRECT/SitePages" is the folder where the page is stored. Please instruct me how to change the code, so that, the hyperlink will be "www.goolge.com" correctly?

thanks,

2

Please include http:// in the href if you are pointing to some absolute URL, or use a / for relative Urls

Absolute URL Reference

<a href='http://www.google.com' id='dialog'>Google</a>

Relative URL Reference

<a href='/sites/PCINDIRECT/SitePages/something.aspx' id='dialog'>Google</a>
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.