Wednesday, April 9, 2014
The nuisance of unknown JavaScript error - try and catch
<script> bbb = function(){ b1 = document.getElementById("jjjj").innerHTML ; b1.click(); } </script> <script> try{ bbb() }catch(err) { txt="There was an error on this page.\n\n"; txt+="Error description: " + err.message + "\n\n"; txt+="Click OK to continue.\n\n"; alert(txt); } </script>
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment