jquery - use .html() method to set javascript -
i'm trying create "mini html editor" using textarea sets html in iframeusing function:
$(document).ready(function(){ $('#outputtxt').keyup(function(){ var tval = $('#outputtxt').val(); $("#frameid").contents().find("body").html(tval); }); }); works fine simple html , styling. doesn't seem working class or id css , doesn't seem working scripts. can .html() method used that?
use div instead of iframe, css work.
Comments
Post a Comment