<script type="text/javascript"> $('.klik').click(function () { $.post('gwiazdki.php', {klik: ''}, function (data) { if(data != ''){ alert(data); } }); return false; }); </script> </head> <body> <ul class="rating nostar"> <li class="one"><div class="klik"><a href="#" title="1 Star">1</a></div></li> <li class="two"><div class="klik"><a href="#" title="2 Stars">2</a></div></li> <li class="three"><div class="klik"><a href="#" title="3 Stars">3</a></div></li> <li class="four"><div class="klik"><a href="#" title="4 Stars">4</a></div></li> <li class="five"><div class="klik"><a href="#" title="5 Stars">5</a></div></li> </ul>
<?php class Browser { "Name" => "unknown", "Agent" => "unknown") ; public function __Construct() { "mozilla", "seamonkey", "konqueror", "netscape", "gecko", "navigator", "mosaic", "lynx", "amaya", "omniweb", "avant", "camino", "flock", "aol"); foreach($browsers as $browser) { { $this->Name = $match[1] ; $this->Version = $match[2] ; break ; } } } public function __Get($name) { { } return $this->props[$name] ; } public function __Set($name, $val) { { SimpleError("No such property or function.", "Failed to set $name", $this->props) ; die ; } $this->props[$name] = $val ; } } ?>
$Browser = new Browser; $Browser->Name
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <style type="text/css"> .rating{ width:80px; height:16px; margin:0 0 20px 0; padding:0; list-style:none; clear:both; position:relative; background: url(img/star-matrix.gif) no-repeat 0 0; } .nostar {background-position:0 0} .onestar {background-position:0 -16px} .twostar {background-position:0 -32px} .threestar {background-position:0 -48px} .fourstar {background-position:0 -64px} .fivestar {background-position:0 -80px} ul.rating li { cursor: pointer; float:left; text-indent:-999em; } ul.rating li a { position:absolute; left:0; top:0; width:16px; height:16px; text-decoration:none; z-index: 200; } ul.rating li.one a {left:0} ul.rating li.two a {left:16px;} ul.rating li.three a {left:32px;} ul.rating li.four a {left:48px;} ul.rating li.five a {left:64px;} ul.rating li a:hover { z-index:2; width:80px; height:16px; overflow:hidden; left:0; background: url(img/star-matrix.gif) no-repeat 0 0 } ul.rating li.one a:hover {background-position:0 -96px;} ul.rating li.two a:hover {background-position:0 -112px;} ul.rating li.three a:hover {background-position:0 -128px} ul.rating li.four a:hover {background-position:0 -144px} ul.rating li.five a:hover {background-position:0 -160px} h3{margin:0 0 2px 0;font-size:110%} </style> <script type="text/javascript"> $('a').click(function () { $.post('gwiazdkix.php', {a: ''}, function (data) { if(data != ''){ alert(data); } }); return false; }); </script> </head> <body> <ul class="rating nostar"> </ul> <ul class="rating onestar"> </ul> <ul class="rating twostar"> </ul> <ul class="rating threestar"> </ul> <ul class="rating fourstar"> </ul> <ul class="rating fivestar"> </ul>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <style type="text/css"> .rating{ width:80px; height:16px; margin:0 0 20px 0; padding:0; list-style:none; clear:both; position:relative; background: url(img/star-matrix.gif) no-repeat 0 0; } .nostar {background-position:0 0} .onestar {background-position:0 -16px} .twostar {background-position:0 -32px} .threestar {background-position:0 -48px} .fourstar {background-position:0 -64px} .fivestar {background-position:0 -80px} ul.rating li { cursor: pointer; float:left; text-indent:-999em; } ul.rating li a { position:absolute; left:0; top:0; width:16px; height:16px; text-decoration:none; z-index: 200; } ul.rating li.one a {left:0} ul.rating li.two a {left:16px;} ul.rating li.three a {left:32px;} ul.rating li.four a {left:48px;} ul.rating li.five a {left:64px;} ul.rating li a:hover { z-index:2; width:80px; height:16px; overflow:hidden; left:0; background: url(img/star-matrix.gif) no-repeat 0 0 } ul.rating li.one a:hover {background-position:0 -96px;} ul.rating li.two a:hover {background-position:0 -112px;} ul.rating li.three a:hover {background-position:0 -128px} ul.rating li.four a:hover {background-position:0 -144px} ul.rating li.five a:hover {background-position:0 -160px} h3{margin:0 0 2px 0;font-size:110%} </style> <script type="text/javascript"> $(function(){ $('a').click(function () { $.post('gwiazdkix.php', {a: ''}, function (data) { if(data != ''){ alert(data); } }); return false; }); } </script> </head> <body> <ul class="rating nostar"> </ul> <ul class="rating onestar"> </ul> <ul class="rating twostar"> </ul> <ul class="rating threestar"> </ul> <ul class="rating fourstar"> </ul> <ul class="rating fivestar"> </ul>
var aa = $(this).text();
$.post('gwiazdkix.php', {a: aa}, function (data) {