HTML中的渲染问题
Rendering Issues in HTML
我在代码中呈现撇号时遇到问题:
if (type == 'Survivor') {
display = isProxy ? (finishedRegistration ? '' : 'Unfinished ') + (name.substr(name.length - 1) == 's' ? name + '’' : name + '’s') + ' Survivor Profile' : 'My ' + (finishedRegistration ? '' : 'Unfinished ') + (locationName ? (locationId == NineElevenRegistries.constants.lookups.survivorLocationWtc911ElsewhereId ? '9/11' : locationName) : '') + ' Survivor Profile';}
撇号字符呈现为&rsquo
,在配置文件链接(应该是Rafal M
Proxy 1's Survivor Profile
,是Rafal M Proxy 1&rsquos Survivor Profile
)。
Name:NineElevenRegistries.helpers.profile.getDisplayName(profile.IsProxyProfile(), true, profile.Name().trim(), 'Survivor', profile.Location() ? profile.Location().Id : '', profile.Location() ? profile.Location().Name : '')
不需要’
:只需写一个'字符。在javascript中,你可以像''''
那样转义,或者像"'"
那样用双引号括起来。
相关文章:
- 使用Handontable在同一列中用纯文本和html对问题进行排序
- 在HTML中调用函数时出现问题
- 在将javascript附加到我的html中时遇到问题
- 使用ajax在html中加载html文件时出现的问题
- 将HTML表单发布到iframe会导致浏览器历史记录出现问题
- 使用HTML和JS的iPhone游戏中的性能问题,以及appMobi
- Html、css和jQuery.我的代码有问题
- jQuery-数据提取问题(html遍历)
- ajax html javascript页面刷新无闪烁问题
- html单选按钮检查问题
- c# mvc nreco HtmlToPdfConverter 问题将 html 文档转换为 pdf
- CSS 溢出的滚动问题:滚动 HTML
- 在我的Javascript和HTML之间的表单提交按钮链接中遇到问题
- 跨域问题:HTML
- Ckeditor出现格式错误的html问题
- 创建/使用简单的美制到公制转换器的问题.(HTML/JavaScript)函数未启动
- 简单的php字符串问题(HTML和javascript)
- 表对齐问题HTML JavaScript
- javascript click()方法的问题/ html
- JavaScript验证问题——HTML表单即使不完整也要提交