Jump to content

empressia

Members
  • Content Count

    1
  • Joined

  • Last visited

  • Days Won

    1

empressia last won the day on October 23

empressia had the most liked content!

Community Reputation

1 Neutral

1 Follower

About empressia

  • Rank
    Newbie
  • Birthday 10/30/1983

Previous Fields

  • Languages
    Polish, English

Contact Methods

  • Website URL
    https://empressia.co/

Profile Information

  • Location
    Poland
  • Interests
    HTML, CSS, JavaScript, PHP, React.js, Vue.js, Symfony, PrestaShop, Sylius, WordPress, Joomla
  1. Hi! item is a function, not an object, so you must call it: linkElements.item(i).setAttribute("target", "_self") By the way, getElementsByTagName returns HTMLCollection and you can get single item also in this way: linkElements[i].setAttribute("target", "_self") Finally, you incorrectly compare whether the target equals _blank. You used "=" which means you are assigning this value. You must use "==" or "===" operator. Please refer to the MDN documentation. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality https://developer.mozi
×
×
  • Create New...