DEV Community


Discussion on: Links and JavaScript πŸ”—

iamshareque profile image

@yashints is it good practice to replace a content on page via ajax with js function call,
<a onclick="openUserProfile();">User Profile</a>
and page SEO doesn't matter for this. or is there a better way to doing this.

yashints profile image
Yaser Adel Mehraban Author

I would not use a link for that, the purpose of link is not to be used for replacing content on the page. Button can be used or any other event handler