Beginner's Guide! -Php Tutorial

Source: Internet
Author: User
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 ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.