window.location.search will return "p=item"
window.location.hash will return "id=1"
simple test in firebug:
alert(window.location.hash);
gozigo_milis gozigo_milis wrote:
Dear all,
Can u give me script with jquery how to get URL after #
Example : index.php?p=item#id=1
How can
window.location.hash.substring(1);
this will take out the "#" sign,
Charlie wrote:
window.location.search
will return "p=item"
window.location.hash will return "id=1"
simple test in firebug:
alert(window.location.hash);
gozigo_milis gozigo_milis wrote:
Dear all,
On Apr 29, 2009, at 2:45 PM, gozigo_milis gozigo_milis wrote:
example : http://www.matrix.com/index.php?p=gallery#page=1
how can I get page=1 (parameter after sign #)
window.location.hash
I hava script like thisscript type=text/javascript
function get_param_name(){
var regexS = ([\\#][^]*);
var regex = new RegExp(regexS);
var results = regex.exec(window.location.hash);
var ret;
if(results == null){
ret = ;
}else{
ret=results[0].replace(#,);
}
return ret;
}
4 matches
Mail list logo