评分
<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="width: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="width: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="width: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>
<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="width: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="width: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="width: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>