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

Popular posts from this blog

c++ - Do gcc's __float128 floating point numbers take the current rounding mode into account? -

java - the value of local variable is not used -