项目符号不显示。当我通过 jsFiddle 尝试相同的方法时,它可以工作。可能是什么原因?
<div id="mainInfo" style="display: none;" title="Customer Information">
<div id="greenCheck" style="display: none;">
<img src= "IMAGE_SOURCE">
</div>
<div id="subInfo" style="display: none;">
</div>
</div>
<div>
//button definition onclick="show()"![enter image description here][1]
</div>
//javascript
function show()
{
var htmlstr = "<p><b>The customer provided the following:</b></p><br/><ul>";
if(true)//some condition which i made true for testing
{
htmlstr = htmlstr + "<li>Date of Birth</li>";
htmlstr = htmlstr + "<li>Social Security Number</li>";
}
htmlstr = htmlstr + "</ul>";
document.getElementById('mainInfo').style.display = 'block';
document.getElementById('greenCheck').style.display = 'block';
document.getElementById('subInfo').style.display = 'block';
jQuery("#subInfo").html(htmlstr);
jQuery("#mainInfo").dialog({
//dialog code
}
}
list-style-type:none 通过 css 文件应用。我在本地文件中进行了修改,它起作用了:)