Here and friends to share a use of JS to achieve the results of the mall star score, I hope to give you some help, of course, better effects are still to be improved.
HTML is as follows:
CSS
Saturday overtime, education backstage also need to have the star rating level of demand, drunk ... Basic know how to do, online also casually looked for, there is no agreement, after all, the demand is different, can not be exactly the same. Study,
The function has two parameters:Obj: the parent container of the img label group. Its type is DOM object;OEvent: event object.The advantage of this function is that the html code can be very concise, and there can be very few images, only two images
Because the parameter variables are not initialized, the $ id variables in pf \ rate. php and pf \ ratemovie. php are prone to injection risks. $ Id = $ _ GET ['id']; $ query = "SELECT infopfen, infopfennum FROM phome_ecms_shop WHERE id = $ id"; $
If the "Buy item discount" option is set for the user group, the purchased price is the discounted price, and the sold price is the non-discounted price. That is, the discount is made at the time of purchase, and the original price is used at the
Some friends often ask: do you think I can make a XX site? Or: I want to buy XX sites. Do you think I can do this? Frequently answering similar questions, and the accuracy is quite high. In fact, every time I read a website, I would like to give him
You can use the searcher. Explain (query, int DOC) method to view the specific composition of a document's score.
In Lucene, the score is calculated by TF * IDF * boost * lengthnorm.
TF: the square root of the number of times the query word appears
Starbox
With Starbox, you can easily create various types of rating Boxes. The project is based on the Prototype JavaScript Framework, and additional scriptaculous frameworks are needed for some special effects.
Starbox
JQuery Ajax rater
Small set is also just beginning to learn JavaScript, think that Taobao evaluation of the star effect is very good, so produced their own to write an idea, first to share the implementation of the results:
I am enclosing the source code I wrote.
Small weave to teach you JS special effects Drag the scroll bar can score effects, small series feel pretty good, use the time may need to asp/php or other language with value and write to the database, this is the realization of the foreground.
We know that in Apple itunes, each song can be graded. The method is to drag the mouse in the "Evaluation" column, with a star score (a bit like hotel rating). His advantage is that you can click "Review" at the top, all songs will be automatically
/**** @ Author: Kevin* @ Date: 2011-07-18* @ Function: to mark 0-10 point to players, and the result is delete the highest* And the lowest, at last reserve the average marks.*/Package com. Homework;
Import java. util. collections;
Public class
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.