How to use external script for hyperlink
ok i am gonna try to link in html which is through external script not direct ahref tag, so here it is,
I have douc.html file and its coding is here,
This HTML page use ahref tag for hyperlink ....
<title>Title of the document</title>
The content of the document......</p>
The <a href="http://sitelink.com">link</a> of the document ......
I want to use external script where the hyperlink is hosted (in script file)and it display here in html page when it loads, how i do that, ????????
Any question will preferred to answer
If I understand your question correctly you can do something like this:
// have a file on your server (I'll call it link.js) that simply reads:
//var myLink = "http://somePlace.com";
var z = document.getElementById('a1');
z.href = myLink;
<a id="a1">This is a link</a>
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread