ajax ÖеÄratingµ½µ×ÔõôʹÓÃÄØ£¿
ÎÒ´ÓÕâ¸öhttp://www.asp.net/AJAX/AjaxControlToolkit/Samples/Rating/Rating.aspx ÏÂÔØÁËÒ»¸öÀà°ü¡£
È»ºóÔÚ¹¤¾ßÀ¸Ìí¼ÓÑ¡Ï£¬Ñ¡ÔñÁËÏÂÔØ°üÀïÃæµÄdllÎļþ¡£
È»ºó°Ñrating¿Ø¼þÍϳöÀ´¡£
ÔÚǰ̨ÊäÈëÈçÏ£ºHTML code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title> AJAX¿Ø¼þÖ®Rating </title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.RatingStar
{
font-size:0pt;
width:13px;
height:12px;
padding:0px;
margin:0px;
cursor:pointer;
display:block;
background-repeat :no-repeat;
}
.filledRatingStar
{
background-image:url(yello.png);
}
. emptyRatingStar
{
background-image:url(yello.png);
}
. savedRatingStar
{
background-image:url(yello.png);
}
</style>
</head>
<body style="text-align: center">
<form id="form1" runat="server">
<div>
<asp:Rating ID="Rating1" runat="server" CurrentRating="2" EmptyStarCssClass="emptyRatingStar"
FilledStarCssClass="filledRatingStar"
StarCssClass="RatingSt
Ïà¹ØÎÊ´ð£º
ÎÒÏÖÔÚÓÃstruts2¿ò¼Ü,ÐèҪʹÓÃajaxʵÏÖ¾Ö²¿Ë¢Ð£¬µ«ÊÇ´ÓÈÝÆ÷Àï·µ»ØµÄÖµ²»ÖªµÀÔõô´Óstruts.xmlÅäÖÃÎļþÀïÓ³Éäµ½jspÒ³ÃæÀÒÔǰservletÀïдout.orint("xxxxx")¾Í¿ÉÒԵõ½~£¬µ«ÊÇÏÖÔÚÓÃstruts¾Í²»ÖªµÀÔõôР......
Hi£¬everybody£¡
×î½üÓÐÒ»¸öϵͳÏÔʾ²ãÓõÄÊÇstruts£¬ÆäÖÐÓÐÒ»¸ö¹¦ÄܾÍÊÇ£¬ÔÚÒ»¸öjspÒ³ÃæÉÏÓкܶà±í¸ñ£¬Ã¿Ò»¸ö±í¸ñÉ϶¼ÓÐÒ»¸ö¶ÔÓ¦µÄidµ±µã»÷Õâ¸ö±í¸ñµÄʱºòµ¯³öÒ»¸öģ̬¶Ô»°¿ò£¬È»ºóÊäÈëÄÚÈÝÔÙÌá½»£¡ÒªÇó¾Í ......
ÎÒJSPµÄÒ³ÃæÊÇ£º
<%@ page language="java" contentType="text/html; charset=gb2312"
%>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......
JScript code:
function upnum(h_id){
var url = "InfoOnOff.asp?ID="+ h_id
var ajax = InitAjax();
ajax.open("GET", url, true);
ajax.onreadystatechange = function() {
if (ajax ......