我正在使用带有动态挖空列的asp.net mvc。其中一个列标题" Status"应该有一个bootstrap popover,用户可以在其中单击一个字体图标问号,并提供一个包含该列信息的popover:
<script type="text/html" id="statusHead">
<th scope="col" class="nowrap" data-bind="css: cellClass, visible: visible">
<a href="#" id="toolTipFiles" data-bind="bootstrapPopover: {
html: true,
placement: 'left',
trigger: 'focus',
content: [
'<ul class=\' fa-ul\'>',
'<li><i class=\'fa-li fa fa-lg fa-circle status-red\'></i>Red: File will be deleted within this quarter.</li>',
'<li><i class=\'fa-li fa fa-lg fa-adjust status-yellow\'></i>Yellow: File will be deleted next quarter.</li>',
'<li><i class=\'fa-li fa fa-lg fa-circle-o status-green\'></i>Green: File will be deleted in more than one quarter.</li>',
'<li><i class=\'fa-li fa fa-lg fa-exclamation status-black\'></i>Black: Exception has been submitted but not yet approved or denied.</li>',
'</ul>'
].join(''),
title: '<center><b>\'Status\' indicates when the file will be deleted</b></center>'
}" data-content="">
<i class="fa fa-question-circle"></i>
</a>
</th> </script>
Visual Studio不喜欢这种语法,我收到以下错误:
1.near data-bind:
&#34;如果此属性值用引号括起来,则引号必须匹配&#34;
'<ul class='\:
&#34;缺少属性名称&#34; 我相信我的所有语录都匹配,所以我不确定问题是什么。我尝试将双引号转换为单引号和单引号转换为双引号,但是当发生这种情况时,弹出窗口就永远不会打开。