五月综合缴情婷婷六月,色94色欧美sute亚洲线路二,日韩制服国产精品一区,色噜噜一区二区三区,香港三级午夜理伦三级三

您現(xiàn)在的位置: 365建站網(wǎng) > 365文章 > 百度編輯器ueditor提交無值內(nèi)容為空的解決辦法

百度編輯器ueditor提交無值內(nèi)容為空的解決辦法

文章來源:365jz.com     點擊數(shù):1321    更新時間:2018-06-07 22:55   參與評論

ueditor讓哥提交了一下午,值都提交不過去,最后只好一步步測試,發(fā)現(xiàn)是標(biāo)簽嵌套問題,坑爹啊?。。?/p>

搗鼓了好多次之后,我不知怎么的把form這一段代碼給他提到table前面(當(dāng)時是鼠標(biāo)沒控制好給拖到上面一行去了,我一刷新有了,這就奇怪了,我一看我代碼的結(jié)尾的部分得form都還沒寫對位置這就好了,難道非要這么寫。)所以我就把結(jié)尾也給提到table外發(fā)現(xiàn)還是好了,這樣我貌似看到了希望,所以我試了幾下把form放到table的里面,發(fā)現(xiàn)就是這個問題,只要放到里面就不行了,所以這個情況還是有點奇怪的。

所以提醒大家,遇到錯誤可以多試幾下。

就是說如果 table 嵌套在 form 標(biāo)簽外面必?zé)o法提交,具體ueditor內(nèi)部代碼沒有研究

以下為測試代碼


以下獲取不了值
<table width="100%" border="0" cellspacing="4" cellpadding="2">    
<form action="templets_one_add.php" method="post" name="form1" onSubmit="return checkSubmit()">    
<input type='hidden' name='dopost' value='save'>        
<tr>     
<td height="24" colspan="2" bgcolor="#FBFCE2"">內(nèi)容:(模板里用{dede:field name='body'/}來獲得)</td>    
</tr>    
<tr>     
<td height="80" colspan="2" align="center">     
<script type="text/javascript" src="/include/ueditor/ueditor.config.js"></script>    
<script type="text/javascript" src="/include/ueditor/ueditor.all.min.js"></script>    
<script type="text/javascript" src="/include/ueditor/lang/zh-cn/zh-cn.js"></script>    
<script name="body" id="body" type="text/plain" style="width:100%;height:350px;"></script>    
<script type="text/javascript">UE.getEditor('body');</script>    
</td>    
</tr>    
<tr>     
<td height="53" align="center">&nbsp;</td>    
<td>    
<input name="imageField" type="image" src="images/button_ok.gif" class="np" width="60" height="22" border="0">    
&nbsp;&nbsp;&nbsp;&nbsp;    
<a href="#" onClick="document.form1.reset();"><img src="images/button_reset.gif" width="60" height="22" border="0"></a>    
</td>    
</tr>    
</form>    
</table>    
</td>    
</tr>    
</table>

 

可以獲得值
<form action="templets_one_add.php" method="post" name="form1" onSubmit="return checkSubmit()">    
<table width="100%" border="0" cellspacing="4" cellpadding="2">    
<input type='hidden' name='dopost' value='save'>       
<tr>     
<td height="24" colspan="2" bgcolor="#FBFCE2"">內(nèi)容:(模板里用{dede:field name='body'/}來獲得)</td>    
</tr>    
<tr>     
<td height="80" colspan="2" align="center">     
<script type="text/javascript" src="/include/ueditor/ueditor.config.js"></script>    
<script type="text/javascript" src="/include/ueditor/ueditor.all.min.js"></script>    
<script type="text/javascript" src="/include/ueditor/lang/zh-cn/zh-cn.js"></script>    
<script name="body" id="body" type="text/plain" style="width:100%;height:350px;"></script>    
<script type="text/javascript">UE.getEditor('body');</script>    
</td>    
</tr>    
<tr>     
<td height="53" align="center">&nbsp;</td>    
<td>    
<input name="imageField" type="image" src="images/button_ok.gif" class="np" width="60" height="22" border="0">    
&nbsp;&nbsp;&nbsp;&nbsp;    
<a href="#" onClick="document.form1.reset();"><img src="images/button_reset.gif" width="60" height="22" border="0"></a>    
</td>    
</tr>        
</table>    
</td>    
</tr>    
</table>
</form>

 


如對本文有疑問,請?zhí)峤坏浇涣髡搲?,廣大熱心網(wǎng)友會為你解答?。?點擊進入論壇

發(fā)表評論 (1321人查看,0條評論)
請自覺遵守互聯(lián)網(wǎng)相關(guān)的政策法規(guī),嚴(yán)禁發(fā)布色情、暴力、反動的言論。
昵稱:
最新評論
------分隔線----------------------------

其它欄目

· 建站教程
· 365學(xué)習(xí)

業(yè)務(wù)咨詢

· 技術(shù)支持
· 服務(wù)時間:9:00-18:00
365建站網(wǎng)二維碼

Powered by 365建站網(wǎng) RSS地圖 HTML地圖

copyright © 2013-2024 版權(quán)所有 鄂ICP備17013400號