About 124,000 results
Open links in new tab
  1. Location href Property - W3Schools

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

  2. What does href expression <a href="javascript:;"></a> do?

    Nov 19, 2025 · 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 …

  3. Location: href property - Web APIs | MDN - MDN Web Docs

    Nov 26, 2023 · The href property of the Location interface is a stringifier that returns a string containing the whole URL, and allows the href to be updated. Setting the value of href navigates to the provided …

  4. 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 …

  5. 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 …

  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 · Here's a blog-style post that explains how to create and assign the href attribute in JavaScript. This is perfect if you're learning DOM manipulation or building dynamic links.

  8. 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.

  9. How to Call JavaScript from a href: A Practical Guide with Code ...

    Dec 16, 2025 · In this guide, we’ll explore multiple methods to call JavaScript from an <a> tag, compare their pros and cons, and share best practices to ensure clean, accessible, and maintainable code.

  10. How to Get href in JavaScript: The Complete 2500+ Word Guide

    Want to easily get the href URL from anchor tags in JavaScript? In this comprehensive 2500+ word guide, I‘ll teach you multiple methods to get href values like a pro.