How To Make An Anchor Tag Refer To Nothing? - Tutorialspoint
Có thể bạn quan tâm
- Home
- Library
- Online Compilers
- Jobs
- Whiteboard
- Tools
- Articles
- Write & Earn
- Courses
- Certifications
- Switch theme
- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
To make an anchor tag refer to nothing, use “javascript: void(0)”. The following link does nothing because the expression "0" has no effect in JavaScript. Here the expression "0" is evaluated, but it is not loaded back into the current document.
Example
Live Demo
<html> <head> <script> <!-- //--> </script> </head> <body> <p>Click the following, This won't react at all...</p> <a href="javascript:void(0)">Click me!</a> </body> </html> varun Updated on: 16-Jun-20205K+ Views
Từ khóa » Html Onclick Do Nothing
-
Make A HTML Link That Does Nothing (literally Nothing) - Stack Overflow
-
Html Href Onclick Do Nothing Code Example - Code Grepper
-
How To Make An OnClick Function Which Is Doing Nothing? (React)
-
Define Do Nothing To Keep User On The Same Page In JavaScript
-
How To Make An Anchor Tag To Do Nothing?
-
What Does Javascript:void(0) Mean? - STechies
-
In React, How Can I Cause Anchors To Do Nothing On Click?
-
Link Behavior - IT Accessibility - NC State University
-
Dr
-
Make Anchor Tag Refer To Nothing With JavaScript/jQuery
-
Back To Basics: Non-Navigating Links For JavaScript Handling
-
React OnClick Event Handlers: A Complete Guide - LogRocket Blog
-
Making Actions Keyboard Accessible By Using The Onclick Event Of ...
-
Button Type In HTML: Here's Why You Should Always Declare It »