This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / TEXTAREA另一个问题:在使用TEXTAREA编辑包含HTML转义字符时,比如 保存时,会被转换为空格,再次保存时这个空格就会被丢失,有没有办法不让TEXTAREA自动转换?
-walacato(walacato);
2006-1-4
(#2696847@0)
-
if php, try addslashes function.
-yimingma(ESTHER);
2006-1-4
(#2696875@0)
-
Need In only can use Javascript case.
-walacato(walacato);
2006-1-4
(#2696949@0)
-
I guess the issue is in server side, not client side. After you submit the form, you need to do something when saving form.I don't know the question clearly, but html is very simple, if you are trying to use a complicated method to do it, it means you are wrong, try to find out a simple way.
-yimingma(ESTHER);
2006-1-4
{170}
(#2697468@0)
-
TEXTAREA在保存时会将显示内容保存下来,但是在显示时,会将转义字符转换。你的意思是在保存时再转换回来?但好象无法完全一对一转换。
-walacato(walacato);
2006-1-4
(#2698057@0)
-
你需要在再次显示时把&转换成 & < 转换成< > 转换成> 这样HTML的代码就可以在TEXTAREA中显示了. 如果用JAVASCRIPT来做, 看里面的代码<script language="javascript"> var s=" AAA "; document.writeln('<textarea name=aaa rows=5 cols=80>'+s.replace(/&/g, '&')+'</textarea>');</script>
不知道你做什么应用, 或许FCKeditor 可以满足你的应用.
-yimingma(ESTHER);
2006-1-4
{231}
(#2698565@0)