我有来自textarea的javascript:
<textarea id="result">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="widget.js"></script>
<script type="text/javascript" src="test.php"></script>
</textarea>
我想从这个javascript中获取HTML:
<script>
$(document).ready(function(){
$(".submit").click(function(){
var html = $('#result').val();
$('#content').html(html);
});
});
</script>
<input type="button" class="submit" value="Ok" />
<div id="content"></div>
结果输出是错误的。我该怎么做?