如何在Fireox中展示天使brackerts [英] How to show angel brackerts in Fireox
本文介绍了如何在Fireox中展示天使brackerts的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
如何在firefox中显示天使括号,标签在IE中正确显示,Chorme,Safari
但问题出现在FireFox中。
我想显示像< manage>这样的数据那我怎么能在FireFox中展示这个呢?
在IE,Chorme,Safari中一切正常。
<尖括号是什么? - SA: - )>
Hi All,
How to show angel brackets in firefox, Tag are showing properly in IE, Chorme, Safari
But problem is coming in FireFox.
I want show the data like <manage> then how can i show this in FireFox?
Everything is working fine in IE, Chorme, Safari.
<What angle brackets? — SA :-)>
推荐答案
我想在我的asp.net表单中显示html标签,如用户类型或< bracket>然后它在那里sh。。标签在IE浏览器中正常显示但不是Firefox。是否有特殊的显示方式?
是 - 你必须做所谓的HTML编码:如果将<
更改为& lt;
,则后者显示为前者! :笑:
它在javascript中有点像PITA,但它有可能:
见这里: http://stackoverflow.com/questions/1219860/html-encoding-in-javascript-jquery [<一个href =http://stackoverflow.com/questions/1219860/html-encoding-in-javascript-jquerytarget =_ blanktitle =新窗口> ^ ]
这给了我这个:
"I wanted to show html tag in my asp.net form like if user type or <bracket> then it shuld there as it is. Tags are showing properly in IE chrome but not is Firefox. Is there special way to show?"
Yes - you have to do what is called HTML Encoding: if changes<
to<
and the latter then displays as the former! :laugh:
It's a bit of a PITA in javascript, but it is possible:
See here: http://stackoverflow.com/questions/1219860/html-encoding-in-javascript-jquery[^]
Which gave me this:
function htmlEscape(str) {
return String(str)
.replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, ''')
.replace(/</g, '<')
.replace(/>/g, '>');
}
function htmlUnescape(value){
return String(value)
.replace(/"/g, '"')
.replace(/'/g, "'")
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/&/g, '&');
}
我在问题文本中添加的括号怎么样?它们是否足够天使(在Firefox中)? :-)
要仔细查看,请单击 改善问题 。
您是否尝试过别的东西?
-SA
How about the brackets I added to the text of your question? Are they angelic enough (in Firefox)? :-)
To take a close look, click Improve question.
Did you try something else?
—SA
这篇关于如何在Fireox中展示天使brackerts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文