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鐗堟湰鍜屽鉤鍙頒俊鎮鏄闈炲父閲嶈佺殑銆傝繖鏈夊姪浜庨伩鍏嶆綔鍦ㄧ殑鍏煎規ч棶棰橈紝騫剁『淇濇偍鐨勫簲鐢ㄧ▼搴忚兘澶熷湪鐩鏍囩幆澧冧腑欏哄埄榪愯屻