$(document).ready(function(){
if(top.location!=self.location)
{
top.location=self.location;
}
});
$(document).ready()方法是用了jquery的页面加载即onload方法