1.请求对象 //传统调用$request = Request::instance();//实例化对象 $request->url();//获取当前的域名 //继承think\Controller class Index extends Controller(){ public function hello(){ return $this->request->url();//获取当前域名 } } //自动注入请求对象 class Index(){ public function hell
1.window对象 /*1.计算浏览器窗口大小*/ //不算滚动条: var width = window.innerWidth; var height = window.innerHeight; document.write("浏览器窗口宽度:"+width+",浏览器窗口高度:"+height+"<br/>"); //算滚动条: var outerWidth = window.outerWidth; var outerHeigh