Does the HTML nodes in <iframe>
support javascript in design mode? For the following code, dialog doesn't pop up when I click the <span>
. My browser is FF 16.0.2. Is there any way to get an alert when clicking the span?
<html>
<body >
<iframe id="myeditor" style="width:500px; height:170px;"></iframe><br><br>
<script type="text/javascript">
editor = document.getElementById("myeditor").contentWindow;
editor.document.designMode="on";
editor.document.open();
editor.document.write('head <span onclick="alert(1)" style="border: solid 1px #666">click me</span> tail');
editor.document.close();
</script>
</body>
</html>
Thanks for reading here. :D