Home > front end >  Bosses for help!!!!!!!!!! Js implementing page to page b b js action of the page
Bosses for help!!!!!!!!!! Js implementing page to page b b js action of the page

Time:10-07

Implemented using js page a jump to page b b js action, how to complete this action, click on a page of a label, jump to page b, and b page one of the div js, you thank you thank you!!!!!!!!

CodePudding user response:

Direct execution not to go

CodePudding user response:

First on a page you write a function method, with the window. The location. The href="" jump to the page you want, general is to jump into the background first, and then returns a page, you can jump straight to page b, then what you want to what of js action on the page b wrote $(function () {} the inside of this method, which means that after each loading page will automatically load

CodePudding user response:

refer to the second floor Timor__ response:
first on a page you write a function method, with the window. The location. The href="" jump to the page you want, general is to jump into the background first, and then returns a page, you can jump straight to page b, then what you want to what of js action on the page b wrote $(function () {} the inside of this method, which means that after each loading page will automatically load

Ok, thank you thank you, I went back to try

CodePudding user response:

reference XujiRe reply: 3/f
Quote: refer to the second floor Timor__ response:
first on a page you write a function method, with the window. The location. The href="" jump to the page you want, general is to jump into the background first, and then return a page, you can jump straight to page b, then what you want to what of js action on the page b wrote $(function () {} the inside of this method, which means that after each loading page will automatically load

Ok, thank you thank you, I go back to try [/quote
ok

CodePudding user response:

 
A page of a label jump address to add a parameter,

To obtain the parameters in the b page js, judging an action,
Var request=(function () {
Var obj={};
Var arr=window. The location. The search. Slice (1). The split (" & amp;" );
For (var I=0, len=arr. Length; I & lt; Len. I++) {
Var nv=arr [I]. The split ("=");
Obj [decodeURIComponent (nv [0]) toLowerCase ()]=decodeURIComponent (nv [1]).
}
return obj;
}) ();
If (request. Arg=="123") {
Alert (" action ");
}
</script>

CodePudding user response:

The same domain name can use the local store

CodePudding user response:

reference 5 floor sky waves reply:
 
A page of a label jump address to add a parameter,

To obtain the parameters in the b page js, judging an action,
Var request=(function () {
Var obj={};
Var arr=window. The location. The search. Slice (1). The split (" & amp;" );
For (var I=0, len=arr. Length; I & lt; Len. I++) {
Var nv=arr [I]. The split ("=");
Obj [decodeURIComponent (nv [0]) toLowerCase ()]=decodeURIComponent (nv [1]).
}
return obj;
}) ();
If (request. Arg=="123") {
Alert (" action ");
}
</script>


My code using this approach, JS action or not to

CodePudding user response:

refer to 6th floor radish yiyi dad reply:
words of the same domain name can use the local store

The small white, I still don't understand

CodePudding user response:

refer to the eighth floor XujiRe response:
Quote: refer to the sixth floor of radish yiyi dad reply:
words of the same domain name can use the local store

The small white, I still don't understand

Really no url preach and always right

CodePudding user response:

radish, 9/f, reference of dad's reply:
Quote: refer to the eighth floor XujiRe response:
Quote: refer to the sixth floor of radish yiyi dad reply:
words of the same domain name can use the local store

The small white, I still don't understand

Really no url preach and always right

no,,, never used

CodePudding user response:

refer to 7th floor XujiRe response:
Quote: refer to fifth floor of the sky wave response:
 
A page of a label jump address to add a parameter,

To obtain the parameters in the b page js, judging an action,
Var request=(function () {
Var obj={};
Var arr=window. The location. The search. Slice (1). The split (" & amp;" );
For (var I=0, len=arr. Length; I & lt; Len. I++) {
Var nv=arr [I]. The split ("=");
Obj [decodeURIComponent (nv [0]) toLowerCase ()]=decodeURIComponent (nv [1]).
}
return obj;
}) ();
If (request. Arg=="123") {
Alert (" action ");
}
</script>


My code using this approach, JS action or not to

Send a look at your code

CodePudding user response:

this is my js code, is how to invoke a page page b the js action

CodePudding user response:

B action cannot directly from a page of the page to invoke,
But a page provides parameter b.h HTML? Arg=123
To capture the arg parameter in the page b, then by b page to perform the action,
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related