⬅︎ Back to createElement('a') with a javascript href
Actually, you should use # for href. The point is that you can avoid using old 'javascript:<...>' style links. Make sure to 'return false' from your onclick event to prevent submitting your link and any page refresh issues. Even better, change the # to a POST URL so that it works for people w/o a JS-enabled browser (webphones, etc.)
Comment
Actually, you should use # for href. The point is that you can avoid using old 'javascript:<...>' style links.
Make sure to 'return false' from your onclick event to prevent submitting your link and any page refresh issues.
Even better, change the # to a POST URL so that it works for people w/o a JS-enabled browser (webphones, etc.)