需要使用js转义HTML chracters [英] need to escape HTML chracters with js

查看:99
本文介绍了需要使用js转义HTML chracters的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要转义HTML chracters所以< test> - > & lt; test& gt;


看起来没有内置的JS功能......任何人都有一个方便吗?


谢谢

I need to escape HTML chracters so <test> --> &lt;test&gt;

Looks like there is no built-in JS function...anyone got one handy ?

thanks

推荐答案

在alt。 www .webmaster ,Boobie写道:
In alt.www.webmaster, Boobie wrote:
我需要转义HTML chracters所以< test> - > & lt; test& gt;

看起来没有内置的JS功能......任何人都有一个方便吗?
I need to escape HTML chracters so <test> --> &lt;test&gt;

Looks like there is no built-in JS function...anyone got one handy?




我不做JavaScript,但我确实有一个问题:

会有10-15%的访问者禁用JavaScript或

浏览器?


-

-bts

-这个空间故意留空。



I don''t do JavaScript, but I do have a question: what happens with
the 10-15% of your visitors who have JavaScript disabled or
unavailable in their browsers?

--
-bts
-This space intentionally left blank.


在新闻中写作:alt。 www.webmaster,comp.lang。 javascript

来自Shagnasty Software食堂的安全

Beauregard T. Shagnasty< a。********* @ example.invalid> ;说:
Writing in news:alt.www.webmaster,comp.lang.javascript
From the safety of the Shagnasty Software cafeteria
Beauregard T. Shagnasty <a.*********@example.invalid> said:
在alt。 www.webmaster ,Boobie写道:
In alt.www.webmaster, Boobie wrote:
我需要转义HTML chracters所以< test> - > & lt; test& gt;
看起来没有内置的JS功能......任何人都有一个方便吗?
I need to escape HTML chracters so <test> --> &lt;test&gt;
Looks like there is no built-in JS function...anyone got one handy?



我不做JavaScript,但我确实有一个问题:在他们的浏览器中禁用或禁用JavaScript的访问者中,有10-15%的访问者会发生什么?



I don''t do JavaScript, but I do have a question: what happens with the
10-15% of your visitors who have JavaScript disabled or unavailable in
their browsers?




hrmm,O / P不是特定的 - 这个/可能/是服务器端的JS问题?


-

William Tasso - 不要干涉龙的事务,因为你是非常好的番茄酱。


g-groups: http://tinyurl.com/e38b2 http://tinyurl.com/cvsla


在alt。 www.webmaster ,William Tasso写道:
In alt.www.webmaster, William Tasso wrote:
写新闻:alt。 www.webmaster,comp.lang.javascript 来自Shagnasty Software自助餐厅的安全Beauregard T. Shagnasty
< a 。********* @ example.invalid>说:
Writing in news:alt.www.webmaster,comp.lang.javascript From the
safety of the Shagnasty Software cafeteria Beauregard T. Shagnasty
<a.*********@example.invalid> said:
在alt。 www.webmaster ,Boobie写道:
In alt.www.webmaster, Boobie wrote:
我需要转义HTML chracters所以< test> - > & lt; test& gt;
看起来没有内置的JS功能......任何人都有一个方便吗?
I need to escape HTML chracters so <test> --> &lt;test&gt;
Looks like there is no built-in JS function...anyone got one
handy?



我不喜欢做JavaScript,但我确实有一个问题:10-15%的访问者在浏览器中禁用了JavaScript或
时,会发生什么?



I don''t do JavaScript, but I do have a question: what happens
with the 10-15% of your visitors who have JavaScript disabled or
unavailable in their browsers?



hrmm,O / P不具体 - 这个/可能/是服务器端的JS
问题?



hrmm, O/P is not specific - this /could/ be a server-side JS
question?




你有一个观点,先生。塔索。在这么晚的时候,我不能想到客户端这样做的原因。 (说到很晚的时候,你刚刚从床上爬了起来吗?< g>)


G''nite,现在......


-

-bts

-这个空间故意留空。



You have a point, Mr. Tasso. At this late hour, I can''t think of a
reason to do it client-side. (Speaking of late hours, did you just
crawl out of bed? <g>)

G''nite, now...

--
-bts
-This space intentionally left blank.


这篇关于需要使用js转义HTML chracters的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆