multi-page-router
About
Browser address resolution tool Multiple page router
Router.config
//router.js const rmap = index: path: "/"//html文件地址,默认是index.tml query: name: "" id: "" pageA: path: "/pageA.html"//html文件地址 query: name: "" id: "" pageC: path: "/pageC.html" query: name: "" id: "" ; ;
Usage
<!--- If you need to point to Internet explorer, you should add it-->
; ; window$Router = Maps;
//window.location.href="target",it will be error,becasue it's query no include iddocument;
//it successdocument;
//window.location.replace("target")document;
//check browser location.search//当前页面检测 var checkLocation = $Router; if checkLocationmisslength // return {maps:routerQueryConfig, routerName:routerKey, miss:lackKey} console
//get location.search query "name$Router
//get location.search and format to json$Router
//disabled history back$Router
example
- The sample code is under the demo directory
- You must open a server instead of opening it directly in the browser
- Advise you to use 'anywhere -p 996' on root directory;