JavaScript's mock star rating

Source: Internet
Author: User

The cursor property in CSS is the type (shape) that specifies the cursor to be displayed.

Default Default cursor (usually an arrow)
Auto Default. The cursor of the browser settings.
Crosshair The cursor is rendered as a crosshair.
Pointer Cursor rendered as a pointer indicating the link (one hand)
Move This cursor indicates that an object can be moved.
E-resize This cursor indicates that the edge of the rectangle can be moved to the right (east).
Ne-resize This cursor indicates that the edge of the rectangle can be moved up and to the right (north/east).
Nw-resize This cursor indicates that the edge of the rectangle can be moved up and to the left (north/west).
N-resize This cursor indicates that the edge of the rectangle box can be moved up (north).
Se-resize This cursor indicates that the edge of the rectangle can be moved down and to the right (south/east).
Sw-resize This cursor indicates that the edge of the rectangle can be moved down and to the left (south/west).
S-resize This cursor indicates that the edge of the rectangle can be moved down (south).
W-resize This cursor indicates that the edge of the rectangle can be moved to the left (west).
Text This cursor indicates the text.
Wait This cursor indicates that the program is busy (usually a table or an hourglass).
Help This cursor indicates the available help (usually a question mark or a balloon).
<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">"http://www.w3.org/1999/xhtml">"Content-type"Content="text/html; charset=gb2312"/><title>javascript's star rating </title>. xx{Cursor:pointer; }     </style> <script type="Text/javascript">function ClickStart (index) {clearstart ();  for(varI=1; i<=index;i++){                      varspan = document.getElementById ('Start'+i); //The stars gradually increase//alert (' span--> ' +span)Span.innerhtml='★'; }} function Clearstart () { for(varI=1; i<=8; i++){                      varspan = document.getElementById ('Start'+i); Span.innerhtml='☆'; }            }   </script> <span onclick='ClickStart (1)'Id='Start1' class='xx'>☆</span> <span onclick='ClickStart (2)'Id='Start2' class='xx'>☆</span> <span onclick='ClickStart (3)'Id='Start3' class='xx'>☆</span> <span onclick='ClickStart (4)'Id='Start4' class='xx'>☆</span> <span onclick='ClickStart (5)'Id='Start5' class='xx'>☆</span> <span onclick='ClickStart (6)'Id='start6' class='xx'>☆</span> <span onclick='ClickStart (7)'Id='Start7' class='xx'>☆</span> <span onclick='ClickStart (8)'Id='Start8' class='xx'>☆</span> </body> 

JavaScript's mock star rating

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.