Answers for "link tag in javascript"

10

html link tag

<head>
  <link rel="stylesheet" type="text/css" href="theme.css">
</head>
Posted by: Guest on March-06-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

Browse Popular Code Answers by Language