Get link anchor out of url with jquery -


मेरे पास एक लिंक है

  & lt; a href = "example.com # exampleId & gt ; लिंक & lt; / a & gt;  

मुझे एक वैर में "#exampleId" मान प्राप्त करने की आवश्यकता है। मैं यह कैसे कर सकता हूँ? मैं सिर्फ # के बिना समाधान पाया।

< P> आपकी मदद के लिए धन्यवाद और सबसे अच्छा संबंध

यह ऑब्जेक्ट में एंकर लिंक पार्ट्स प्राप्त करने के लिए अच्छी चाल है, कृपया इस कोड की कोशिश करें

  & lt; a href = "example.com # exampleId" & gt; लिंक & lt; / a & gt; & lt; script & gt; var parse = document.createElement ('a'); parse .href = document.getElementsByTagName ("a") [0]; चेतावनी (parse.hash); & lt; / script & gt;  


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -