cyrixware Posted March 28, 2008 Share Posted March 28, 2008 Hi how to optimize Alert() in javascript. Let say i want ti include this "onclick="history.go(-1);return false;" inside of the message box. Quote Link to comment Share on other sites More sharing options...
ds111 Posted March 29, 2008 Share Posted March 29, 2008 easy: <script> function doStuff() { return false; history.go(-1); } </script> <a href=javascript:alert("Text goes here."); onclick=doStuff()>Link text goes here.</a> im really sleepy/tired so i might have added an extra ; or maybe left out a ; but u get the point Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.