doupang4126 2014-10-06 11:40
浏览 323

Echo语句在输出中呈现html代码

This is such a basic question that I feel embarrassed asking it. Whenever I echo html tags, instead of rendering the tag, it just displays in the echo output. I have tried single and double quotes, but still no luck. What am I doing wrong here? Thanks

<a style="margin-left: 12px;" href="javascript:void(0)" class="tooltip" title="<?php echo "Please select your boxes from the list. You can select a max of 20 boxes per submission.<br />You can select multiple boxes by holding the left ctrl on your keyboard and making your selection"; ?>">Help</a> 

ff rendered output:

title="Please select your boxes from the list. You can select a max of 20 boxes per submission.<br />You can select multiple boxes by holding the left ctrl on your keyboard and making your selection" 
  • 写回答

2条回答 默认 最新

  • dpn517111 2014-10-06 11:58
    关注

    HTML code can not be put inside a title tag as browser will not render titles as anything else than a pure text string.

    评论

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献