I insert some javascript into what I am editing in FckEditor, such as : alert('hi')
when I write it like this:
You are using <a href="http://www.fckeditor.net/">FCKeditor</a></em><strong id="input1" onclick="alert('aaa');">HI</strong>
it works, a alert box popup when i click HI
but, when I write it like this:
You are using <a href="http://www.fckeditor.net/">FCKeditor</a></em><strong id="input1" onclick="myalert()">HI</strong> <script> function myalert() { alert{'aaa'} } </script>
It doesn't work, and the browser reports error : cannot find object myalert!
my question is, what's wrong with these code, how can i make it run when i insert some js code between <script> and </script>.
thanks for any comment