$sql="update vote set count=count+1 where id=$id"
if(mysql_query($sql))
{
$_SESSION["vote"]=session_id()
?>
<script language="javascript">alert("投票成功,点确定查看结
果")location.href="index.php?id=ck"</script>
String.prototype.getQuery = function(name){
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)")
var r = this.substr(this.indexOf("\?")+1).match(reg)
if (r!=null) return unescape(r[2])return null
}
var s = "web1.aspx?status=item&mode=edit"
alert(s.getQuery("status"))
alert(s.getQuery("mode"))
String.prototype.getQuery = function(name)
的意思是为String对象增加一个getQuery(name)方法.