下面是我的 JSP 代码:
<tr>
<td colspan="2">custEmail</td>
<td colspan="5"><div id= "custEmail"><p><strong>Test</strong></p></div></td>
</tr>
下面是div
使用TinyMCE 编辑器附加的代码
<script type="text/javascript" src="tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinyMCE.init({
width : "640",
mode : "exact",
elements : "custEmail",
theme : "advanced",
plugins : "preview",
readonly : true,
theme_advanced_buttons1 : "forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,formatselect,fontselect,fontsizeselect,sub,sup,|,bold,italic,underline,strikethrough",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
</script>
但是在我的 HTML 页面上,我看到的内容是:
<p><strong>Test</strong></p>
而不是大胆的测试。只要我更改以下内容:
div id="custEmail" tag to textarea id="custEmail"
它工作正常。不确定我是否需要对 div 标签进行一些设置?