【发布时间】:2014-08-14 09:58:23
【问题描述】:
这个脚本我用在summernote
<script type="text/javascript">
$(function() {
$('.summernote').summernote({
height: 200
});
$('form').on('submit', function (e) {
alert($('.summernote').code());
});
});
</script>
现在的问题是,如果我用下面的代码发短信
<html>
<head><title>global scope post</title></head>
<body>
<form action="" method="post">
Name:<input type="text" name="name">
<button>Submit</button>
</form>
</body>
</html>
这给了我如下图所示的代码输出。
我将如何在 Summernote 中定义代码?这里我尝试了代码标签,但结果是一样的。
【问题讨论】:
-
您使用了
$('.summernote'),但我没有看到您的代码中的任何地方都使用了summernote类。
标签: javascript jquery summernote