我下载了一个星级评级代码,可是怎么来获取他评级后的值呢。
我的代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Rating</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="rating.js"></script>
<link rel="stylesheet" type="text/css" href="rating.css" />
<script type="text/javascript">
$(document).ready(function() {
$('#rate2').rating('www.url.php', {maxvalue:8, curvalue:3});
});
</script>
<style type="text/css">
.implementation{
border:dashed 2px #333333;
background-color:#CCCCCC;
color:#000000;
width:50%;
}.spacer{
clear:both;
height:0px;
}
.left{
float:left;
width:250px;
}
</style>
</head>
<body>
<form action="rating_save.php" name="rating" method="post">
</div>
<div id="rate2" class="rating">&nbsp;</div>
<div class="implementation">
<pre>$('#rate2').rating('www.url.php', {maxvalue:5, curvalue:3});</pre>
</div>
<div>&nbsp;</div>
<div>
As you might have notice, for single star, the script works like a star/unstarl. For two or more stars, it works as a rating system. To value at the server end can be recieved via post variable named &quot;rating&quot;.
</div>
<div style="height:5px">&nbsp;</div>
<input name="submit" type="submit" value="提交" />
</form>
</body>
</html>