About 21,900,000 results
Open links in new tab
  1. What does href expression <a href="javascript:;"></a> do?

    And he couldn't simply leave the href blank, because href='' is a link back to the current page (ie it causes a page refresh). There are ways around these things. Using an empty bit of Javascript code …

  2. HTML a href Attribute - W3Schools

    Definition and Usage The href attribute specifies the URL of the page the link goes to. If the href attribute is not present, the <a> tag will not be a hyperlink. Tip: You can use href="#top" or href="#" to link to …

  3. How to Create a Link in JavaScript ? - GeeksforGeeks

    Aug 6, 2025 · In JavaScript, a link typically refers to creating HTML hyperlinks (<a> tags) dynamically using JavaScript. You can link using a document.createElement ('a'), setting attributes like href and …

  4. javascript: URLs - URIs | MDN

    Jul 1, 2025 · JavaScript URLs, URLs prefixed with the javascript: scheme, are used as fake navigation targets that execute JavaScript when the browser attempts to navigate. If the URL evaluates to a …

  5. Using HREF JavaScript to Call JavaScript Functions in HTML Links

    Feb 13, 2024 · In this comprehensive exploration, we delve into the intricacies of leveraging the href attribute to call JavaScript functions within HTML links, unlocking a world of possibilities for web …

  6. HREF JavaScript: Call JavaScript Functions - Udemy Blog

    In JavaScript, you can call a function or snippet of JavaScript code through the HREF tag of a link. This can be useful because it means that the given JavaScript code is going to automatically run for …

  7. Today I Learned: How to Create and Set an `href` Attribute in ...

    May 29, 2025 · One of the most common tasks when working with the DOM is dynamically creating links. Whether you're generating links from an API or changing a link’s destination based on user …

  8. JavaScript href Expression - Delft Stack

    Mar 11, 2025 · This article explains what a href expression does in JavaScript, focusing on its importance for dynamic web applications. Learn how to manipulate the href attribute to create …

  9. Which "href" value should I use for JavaScript links, "#" or ...

    Sep 26, 2008 · It's nice to have your site be accessible by users with JavaScript disabled, in which case the href points to a page that performs the same action as the JavaScript being executed.

  10. Location href Property - W3Schools

    Description The location.href property sets or returns the entire URL of the current page.