zoukankan      html  css  js  c++  java
  • 评分

      <script type="text/javascript" src="js/jQuery-1.3.2.js"></script>
      <script type="text/javascript" src="js/jquery.krater.js"></script> 
     
      <script type="text/javascript">
       $(function() {
      $("#test_krater_1").krater({raterOn:'images/stars_on.gif',raterOff:'images/stars_off.gif',valueObj:'krater_1',starQuantity : 10});
      $("#test_krater_2").krater({raterOn:'images/stars_on.gif',raterOff:'images/stars_off.gif',valueObj:'krater_2',starQuantity : 10,onClick:function(x){alert($("#test_krater_2").attr('readOnly'));}});
      $("#test_krater_3").krater({raterOn:'images/stars_on.gif',raterOff:'images/stars_off.gif',valueObj:'krater_3',starQuantity : 10,onClick:function(x){alert($("#test_krater_3").attr('value'));}});
       });  
      
      
      </script>  
      Usage 1:<span id="test_krater_1" name="test_krater" value=0></span><input id="krater_1" disabled="disabled" style="35px;text-align:center;border:none"><br>
       
      Usage 2:<span id="test_krater_2" name="test_krater" value=60></span><input id="krater_2" disabled="disabled" style="35px;text-align:center;border:none"><br>
     
      评分:<span id="test_krater_3" name="test_krater" value=0></span><input id="krater_3" disabled="disabled" style="35px;text-align:center;border:none">
      <input type="button" onClick="$('#test_krater_3').attr('readOnly','false');" value=" make 'Simple Usage 3' readOnly = false">
      <input type="button" onClick="$('#test_krater_3').attr('readOnly','true');" value=" make 'Simple Usage 3' readOnly = true"><br>
      <input type="button" onClick="alert($('#test_krater_1').attr('value'));" value="get 'Simple Usage 1' Value"><br>
      <input type="button" onClick="alert($('#test_krater_2').attr('value'));" value="get 'Simple Usage 2' Value"><br>
     
     <input type="button" onClick="alert($('#test_krater_3').attr('value'));" value="get 'Simple Usage 3' Value"><br>
  • 相关阅读:
    48. Rotate Image
    47. Permutations II
    46. Permutations
    45. Jump Game II
    44. Wildcard Matching
    43. Multiply Strings
    42. Trapping Rain Water
    Python_匿名函数
    Python_内置函数之map()
    Python_面向对象_单例模式
  • 原文地址:https://www.cnblogs.com/ly312/p/1875607.html
Copyright © 2011-2022 走看看