V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Eysa
V2EX  ›  问与答

关于浏览器如何解析字符串与html标签的问题。

  •  
  •   Eysa · Dec 20, 2011 · 5645 views
    This topic created in 5255 days ago, the information mentioned may be changed or developed.
    <html><b>这里要显示字符串</b>换行<br />在换行<br /></html>

    显示成:

    <html><b>这里要显示字符串</b>换行
    在换行
    </html>

    怎么做让浏览器这样显示?或由其他方案?
    4 replies    1970-01-01 08:00:00 +08:00
    reducm
        1
    reducm  
       Dec 20, 2011 via Android
    楼主是要输出到页面显示大于小于号等特殊字符的意思吗?手写的话每个特殊字符对应一个字符串,后端生成的话一个函数搞定
    chenluois
        2
    chenluois  
       Dec 20, 2011 via iPhone
    自行搜索 "HTML 实体"
    hanfeizi
        3
    hanfeizi  
       Dec 20, 2011
    没看明白
    NemoAlex
        4
    NemoAlex  
       Dec 20, 2011
    http://www.w3school.com.cn/html/html_entities.asp
    这个问题楼主发了两篇文了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   854 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 20:32 · PVG 04:32 · LAX 13:32 · JFK 16:32
    ♥ Do have faith in what you're doing.