0

When i have the address: <link rel = "alternate" hreflang = "de" href = "..." />.
I would like to take the hreflang value from this address, meaning "de".

1 Answer 1

0

You can get that value with this code.

var x = document.getElementById("myLinkID").hreflang;

4
  • I need to get it in php
    – bambo
    Aug 2, 2021 at 10:44
  • Than how your current code for setting that value? Aug 2, 2021 at 10:54
  • this value is set by the external module
    – bambo
    Aug 2, 2021 at 11:01
  • yes, but using which code? then we get idea how to get this in php Aug 2, 2021 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.