在列表视图事件的 ListView1_ItemDataBound 上,我像这样创建literal.text ...
<span style="position:relative;">
style="position:relative">
<span id="term1" class="popup">This id="term1" class="popup">This is the answer!</span>
<a href="javascript:void(0);"onMouseover="ShowPop('term1');" onMouseout="HidePop('term1');">Show href="javascript:void(0);"onMouseover="ShowPop('term1')" onMouseout="HidePop('term1')">Show me the answer</a></span>
问题是文本没有按应有的方式呈现。在将鼠标悬停在文字控件上时,网址为
http://localhost:1391/"javascript:void(0);"onMouseover="ShowPop('term1');"
那么这里发生了什么?我错过了什么?
UPDATE1: 这是来自浏览器的来源
<span style="position:relative;"> <span id="term1" class="popup">This is the answer!</span> <a href="javascript:void(0);" onMouseover="ShowPop('term1');" onMouseout="HidePop('term1');">Show me the answer</a></span>
UPDATE2: 这是屏幕的输出
This is the answer Show me the answer
在哪里...
告诉我答案是指向的超链接http://localhost:1391/"javascript:void(0);"