Cainiao for guidance !! Graduates, graduation design for advice! It may be a little long. I really hope to help you !! Thank you! Because ajax is not used, echo & nbsp; & lt; a & nbsp; onclickcookin () & nbsp; href. $ url .?. $ Addurl [0]. $ addurl [1]. $ addurl [2]. $ addurl [3 Cainiao guide !!
Graduates, graduation design for advice! It may be a little long. I really hope to help you !! Thank you!
Because ajax is not used, something will happen.
echo '';
Actually, I want to do paging, but a page has several tabs,
Assume that I click the button on the first page and the page is successfully displayed.
(http://localhost/steak/delicioustour.php?page_c=2&
,
Click the button for the first page to change the content of the first page. The second page can also be successfully displayed.
http://localhost/steak/delicioustour.php?page_t=2&
But my ideal url is
http://localhost/steak/delicioustour.php?page_c=2&page_t=2
Therefore, I added an onclick to the tag, called the js function, and changed the value of $ addurl [0 ].
function cookre(){
alert('aa');
}
function cookin(){
alert('bb');
}
However, when I click the tag, the onclick method is not called and I do not know how to write it !!! Thank you for your guidance!
It may be a syntax problem !!
Php? Function javascript ajax
------ Solution --------------------
Your javascript only changes local variables. At least get a new url
------ Solution --------------------
You have a problem with this idea first. your idea should be to change the GET parameter as needed, instead of using a new link every time.
For example, there is a URL: a. php? A = aa & B = bb & c = cc
If you want to pass certain information through $ _ GET ['B'], you should extract and modify the parameter $ _ GET ['B, retain other query parameters.
We recommend that you use the manual to check the following two functions: parse_url () and http_build_query ()