<a href="javascript:document.getElementById('create_table').style.display='block'">Insert Table</a>
The code works perfectly fine in Google Chrome but in Internet Explorer and Firefox it just redirects to a page with the text “block”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should never use the
javascript:pseudoprotocol. Use theclickevent for this. Besides, also watch the quotes.Here’s the correct approach:
Note that I (optionally) returned false here to block the default action.