Answers for "how to create html link using javascript"

7

javascript link in html

<script type="text/javascript" src="./der/pfad/zu/der/datei.js"></script>
Posted by: Guest on August-01-2020
-1

create a link javascript

<html>
  <head></head>
  <body>
    <script>
      var a = document.createElement('a');
      var linkText = document.createTextNode("my title text");
      a.appendChild(linkText);
      a.title = "my title text";
      a.href = "http://example.com";
      document.body.appendChild(a);
    </script>
  </body>
</html>
Posted by: Guest on October-14-2020

Code answers related to "how to create html link using javascript"

Browse Popular Code Answers by Language