location.js
v0.1.1
Published
a fast window location parse libary.
Downloads
2
Readme
location.js
a fast window location parse library.
usage
<script type="text/javascript" src='location.js'></script>
<script type="text/javascript">
var hash = locationJS.getHash()
var search = locationJS.getSearch()
</script>
Api
- getHash([key])
/*
* url: www.yangxiaofu.com/#name=yangxiaofu
*/
var hash = locationJS.getHash() /*get the hash object*/
var name = locationJS.getHash('name') /*get the name hash value*/
- getSearch([key])
/*
* url: www.yangxiaofu.com/?name=yangxiaofu
*/
var searcg = locationJS.getSearch() /*get the hash object*/
var name = locationJS.getSearch('name') /*get the name hash value*/