Links in JS

Javascript coding ..

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 1
Joined: Wed Feb 10, 2021 11:39 pm

Wed Feb 10, 2021 11:50 pm


When it comes to inserting links via Javascript, we usually use 2 different methods, but we are not specialists in this. We normally use the following methods:
Which of the 2 is more suitable to implement, are there other ways to introduce the link via JS?

Thank you very much and best regards from Rodanet!
php-forum Fan User
php-forum Fan User
Posts: 137
Joined: Mon Jun 08, 2020 2:00 am

Thu Feb 11, 2021 12:40 am

Is there any reason you can't just use proper <A> link elements? These will work much more predictably for users with screen readers or out of date devices.
Post Reply