1. js閲岄溃濡备綍浣跨敤document.location𨱒ユ墦寮链鍦癊XE鏂囦欢
瀵逛簬杩欐牱涓涓猆RL銆銆 http://www.x2y2.com:80/fisker/post/0703/window.location.html?ver=1.0&id=6#imhere銆銆鎴戜滑鍙浠ョ敤javascript銮峰缑鍏朵腑镄勫悇涓閮ㄥ垎銆銆1, window.location.href銆銆鏁翠釜URl瀛楃︿覆(鍦ㄦ祻瑙埚櫒涓灏辨槸瀹屾暣镄勫湴鍧镙)链渚嬭繑锲炲: http://www.x2y2.com:80/fisker/post/0703/window.location.html?ver=1.0&id=6#imhere銆銆2,window.location.protocol銆銆URL 镄勫岗璁閮ㄥ垎銆銆链渚嬭繑锲炲:http: 銆銆3,window.location.host銆銆URL 镄勪富链洪儴鍒嗐銆链渚嬭繑锲炲:www.x2y2.com銆銆4,window.location.port銆銆URL 镄勭鍙i儴鍒嗐銆濡傛灉閲囩敤榛樿ょ殑80绔鍙(update:鍗充娇娣诲姞浜:80)锛岄偅涔堣繑锲炲煎苟涓嶆槸榛樿ょ殑80钥屾槸绌哄瓧绗︺銆链渚嬭繑锲炲:"" 銆銆5,window.location.pathname銆銆URL 镄勮矾寰勯儴鍒(灏辨槸鏂囦欢鍦板潃)銆銆链渚嬭繑锲炲:/fisker/post/0703/window.location.html 銆銆6,window.location.search銆銆镆ヨ(鍙傛暟)閮ㄥ垎銆銆闄や简缁椤姩镐佽瑷璧嫔间互澶栵纴鎴戜滑钖屾牱鍙浠ョ粰闱欐侀〉闱,骞朵娇鐢╦avascript𨱒ヨ幏寰楃浉淇″簲镄勫弬鏁板笺銆链渚嬭繑锲炲:?ver=1.0&id=6 銆銆7,window.location.hash銆銆阌氱偣==========================================銆銆document.href=" http://www.sina.com.cn"銆銆銆document.location=" http://www.sina.com.cn"銆銆銆window.location=" http://www.sina.com.cn"銆銆銆鍙鏄灞炰簬鍖呭惈镄勯梾棰樸銆銆 涓涓鏄痺indow,涓涓鏄痉ocument銆銆location銆銆鏄涓瀵硅薄銆銆姣斿傛湰椤电殑document.location銆銆鍜寃indow.location镄勫睘镐ф湁銆銆 location.hostname銆銆=銆銆community.csdn.net銆銆銆 location.href銆銆=銆 http://community.csdn.net/Expert/topic/4033/4033372.xml?temp=2.695864E-02銆銆銆 location.host銆銆=銆銆community.csdn.net銆銆銆 location.hash銆銆=銆銆銆銆 location.port銆銆=銆銆
location.pathname銆銆=銆銆/Expert/topic/4033/4033372.xml銆銆銆 location.search銆銆=銆銆?temp=2.695864E-02銆銆銆 location.protocol銆銆=銆銆http:銆銆銆 鍙瑙乭ref銆銆鏄痩ocation镄勫睘镐с銆绫诲埆鏄痵tring銆銆銆
2. nwjs濡备綍锷犺浇璧勬枡鍒版湰鍦帮纻
濡傛灉鎭ㄧ殑璧勬枡𨱒ヨ嚜镟撮珮镄刵wjs鐗堟湰锛岄偅涔堟偍镞犳硶浣跨敤浣庣増链镄刵wjs𨱒ュ姞杞借繖浜涜祫鏂欍
nwjs锛圢ode.js with Chromium锛夋槸涓涓锘轰簬Chromium鍜孨ode.js镄勫紑婧愭嗘灦锛岀敤浜庢瀯寤烘岄溃搴旂敤绋嫔簭銆俷wjs鍏佽稿紑鍙戣呬娇鐢℉TML銆丆SS銆丣avaScript鍜孨ode.js API𨱒ュ垱寤鸿法骞冲彴镄勬岄溃搴旂敤绋嫔簭銆傜敱浜峦wjs缁揿悎浜哤eb鎶链鍜屾岄溃搴旂敤绋嫔簭镄勫姛鑳斤纴锲犳ゅ畠鎴愪负璁稿氩紑鍙戣呯殑棣栭夊伐鍏蜂箣涓銆
铹惰岋纴涓庤稿氲蒋浠跺钩鍙颁竴镙凤纴nwjs镄勪笉钖岀増链涔嬮棿鍙鑳藉瓨鍦ㄥ吋瀹规ч梾棰樸傚傛灉鎭ㄧ殑璧勬枡锛堜緥濡备唬镰併佸簱鎴栨暟鎹鏂囦欢锛夋潵镊镟撮珮鐗堟湰镄刵wjs锛岄偅涔堟偍鍙鑳芥棤娉曚娇鐢ㄤ绠鐗堟湰镄刵wjs𨱒ュ姞杞借繖浜涜祫鏂欍傝繖鏄锲犱负楂樼増链镄刵wjs鍙鑳藉紩鍏ヤ简鏂扮殑锷熻兘銆丄PI鎴栦唬镰佺粨鏋勶纴钥屼绠鐗堟湰镄刵wjs鍙鑳戒笉鏀鎸佽繖浜涚壒镐с
涓句釜渚嫔瓙锛屽亣璁炬偍链変竴涓浣跨敤nwjs 15.0鐗堟湰缂栧啓镄勯”鐩锛屽苟涓旀偍𨱍冲皢鍏惰縼绉诲埌nwjs 14.0鐗堟湰銆傚傛灉鎭ㄧ殑椤圭洰涓浣跨敤浜嗗湪nwjs 15.0涓寮曞叆镄勬柊API鎴栧姛鑳斤纴闾d箞鎭ㄥ皢镞犳硶鐩存帴鍦╪wjs 14.0涓浣跨敤杩欎簺浠g爜锛屽洜涓轰绠鐗堟湰镄刵wjs涓嶆敮鎸佽繖浜涚壒镐с傚湪杩欑嶆儏鍐典笅锛屾偍闇瑕佷慨鏀逛唬镰佷互阃傚簲浣庣増链镄𪞝PI鍜屽姛鑳斤纴鎴栬呰冭槛鍗囩骇鍒颁竴涓鍏煎圭殑楂樼増链琻wjs銆
姝ゅ栵纴鍗充娇鏄钖屼竴鐗堟湰镄刵wjs锛屽湪涓嶅悓镎崭綔绯荤粺鎴栧钩鍙颁笂涔熷彲鑳藉瓨鍦ㄥ吋瀹规ч梾棰樸傚洜姝わ纴鍦ㄨ縼绉婚”鐩鎴栧叡浜璧勬枡镞讹纴纭淇濅简瑙g洰镙囩幆澧冩墍浣跨敤镄刵wjs鐗堟湰鍜屽钩鍙颁俊鎭鏄闱炲父閲嶈佺殑銆傝繖链夊姪浜庨伩鍏嶆綔鍦ㄧ殑鍏煎规ч梾棰桡纴骞剁‘淇濇偍镄勫簲鐢ㄧ▼搴忚兘澶熷湪鐩镙囩幆澧冧腑椤哄埄杩愯屻