Code: Select all
<script language="Javascript">
document.write('<html>');
document.write('<head>');
document.write('<title>Star Rating</title>');
document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
document.write('</head>');
document.write('<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
alert (num);
function star(num) {
int num;
if (num=='') {
num = 1;
}
int
document.write('<img src="star' + num + '.gif" width="80" height="15" border="0" alt="" usemap="#stars_Map">');
decument.write('<input type="hidden" name="rating" value="' + num + '">');
}
alert (num);
document.write('<map name="stars_Map">');
document.write('<area shape="rect" onMouseover="star(1)" alt="Rate 5" coords="64,0,79,15" href="5.html">');
document.write('<area shape="rect" onMouseover="star(2)" alt="Rate 4" coords="48,0,63,15" href="4.html">');
document.write('<area shape="rect" onMouseover="star(3)" alt="Rate 3" coords="32,0,47,14" href="3.html">');
document.write('<area shape="rect" onMouseover="star(4)" alt="Rate 2" coords="16,0,31,14" href="2.html">');
document.write('<area shape="rect" onMouseover="star(5)" alt="Rate 1" coords="0,0,15,14" href="1.html">');
document.write('</map>');
document.write('</body>');
document.write('</html>');
</script>