0

我怎样才能在语句的最后添加一个图标 [+],这样如果我点击一个图标,我可以得到一个警报。

<div id="catalog" style="width: 518px;">
      <ul id="catalog111" style="left: -37px;top:       -140px;width=500%;">
        <li class="ui-state-default" style="list-style:square; margin: 5px; padding: 5px;
  color: black; background-color: #A0A0A0; width: 441px; font-size: 12px;color: #313b3b"  
    >I should be able to select a document to upload into system  'Need Icon'</li>

      </ul>

   </div>​
4

1 回答 1

1

你可以这样做,

<script language="javascript" type="text/javascript">
$(document).ready(function() {
    $('#plus').click(function(){
        alert('+ sign clicked');
    });
});                
</script>

您可以使用超链接在语句末尾放置一个链接,

<div id="catalog" style="width: 518px;">
      <ul id="catalog111" style="left: -37px;top: -140px;width=500%;">
        <li class="ui-state-default" style="list-style:square; margin: 5px; padding: 5px; color: black; background-color: #A0A0A0; width: 441px; font-size: 12px;color: #313b3b">I should be able to select a document to upload into system <a href="#" id="plus" style="text-decoration:none">[+]</a></li>
      </ul>
</div>​
于 2012-11-12T05:44:17.070 回答