- 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
How to search the value of the target attribute of a link in JavaScript?
To search the value of the target attribute of a link in JavaScript, use the target property. You can try to run the following code to get the value of target attribute.
Example
<!DOCTYPE html> <html> <body> <p><a id = "qriesid" target="_self" href = "https://qries.com/" type = "text/html" >Qries</a></p> <script> var x = document.getElementById("qriesid").target; document.write("Value of the target attribute: "+x); </script> </body> </html>
Advertisements