javascript123456
Technical User
i am trying to make a comment editor with iframe, and want to trigger the change of content inside iframe, the following code cant work.
it is strange because it works fine when i replace them with "keypress" and "blur"
it is strange because it works fine when i replace them with "keypress" and "blur"
Code:
<iframe id="iframe"></iframe>
<script>
frameobj=document.getElementById('iframe').contentWindow;
// IE
frameobj.attachEvent('onpropertychange', function(){alert();} );
//FireFox
frameobj.addEventListener('input', function(){alert();} , false);
</script>