How can I change the value after clicking a cell?

Source: Internet
Author: User
How can I change the value after clicking a cell? Dear friends, I want to click a cell. the content of the cell and the assignment of another variable change. I wrote this, but it does not seem to work. why? Thank you!
$ Txt = 'none'; $ m = 17;
Echo"
". $ Txt ."
";

Function ad (){
If ($ txt = 'no ')
{$ Txt = 'you ';
$ M = 21 ;}
Else
{$ Txt = 'none ';
$ M = 17 ;}
}

?>
In fact, $ txt is two values, one is "none", the other is "you", and $ m is two values, one is 17, and the other is 21.


Reply to discussion (solution)

Of course not!

The js function ad is called here, not the php function ad.

How can we change it? I still can't! Thank you.

Can someone help me? How to implement this.

You write function ad () in the script tag and follow the echo statement. Click does not call PHP functions.

Still not. I actually want to click a cell and switch the content between two values. I don't know how to implement it.

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.