About 560,000 results
Open links in new tab
  1. html - How to call javascript from a href? - Stack Overflow

    May 2, 2013 · The proper way to invoke javascript code when clicking a link would be to add an onclick handler: <a href="#" onclick="myFunction()">LinkText</a> Although an even "more …

  2. Using HREF JavaScript to Call JavaScript Functions in HTML …

    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 …

  3. HREF JavaScript: Call JavaScript Functions - Udemy Blog

    To call a JavaScript function, you can use the HREF attribute of an HTML Link, using HREF JavaScript. Take a look at how it works.

  4. JavaScript: Callbacks with href vs onclick for Links and Buttons

    Nov 1, 2023 · Callback functions are invaluable in JavaScript for handling complex asynchronous logic and creating clean, maintainable code. When adding callbacks to links and buttons, …

  5. A href JavaScript function call | Simple Code - EyeHunts

    Jun 4, 2021 · Simple use javascript:void (0) as the value of href and onclick method function name to call JavaScript function. Or another way is to use javascript:method_name as the …

  6. Href Javascript Function: Javascript Explained - Bito

    May 5, 2024 · Many developers rely on the Href Javascript function to create HTML link elements for their websites. This article will explain what this function is and how to use it, as well as …

  7. JavaScript - href vs onclick for callback function on Hyperlink

    In terms of javascript, one difference is that the this keyword in the onclick handler will refer to the DOM element whose onclick attribute it is (in this case the <a> element), whereas this in the …

  8. Links used to activate JavaScript functions - flaviocopes.com

    Sep 21, 2019 · Which "href" value should I use for JavaScript links, "#" or "javascript:void (0)"? When you are creating an app using plain JavaScript, sometimes you’ll have the necessity of …

  9. [JavaScript] How to Invoke JavaScript Functions Using `<a href>`

    Aug 29, 2023 · In modern web development, invoking JavaScript functions using HTML elements is a standard practice. One such element, <a href>, commonly used for hyperlinks, can also …

  10. JavaScript Function in href vs onClick - Online Tutorials Library

    Learn the differences between using JavaScript functions in href attributes and onClick events in this detailed guide.

  11. Some results have been removed
Refresh