How do I change the assignment by clicking on a cell?

Source: Internet
Author: User
Dear God, I would like to achieve click on a cell, the contents of the cell and the assignment of the other variable is changed, I wrote, it seems not possible, why? Thank you!
$txt = ' no '; $m = 17;
echo "
". $txt."
";

function ad () {
if ($txt = = ' no ')
{$txt = ' have ';
$m = 21;}
Else
{$txt = ' no ';
$m = 17;}
}

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


Reply to discussion (solution)

Of course not!

This is called the JS function ad, not the PHP function ad

How do you change that? I still can't! Thank you, great God.

Do you have a look for me? How to achieve this ah.

You write the function ad () in the script tag followed by the Echo statement. The Click Call is not a PHP function.

It's still not working. I actually want to implement the Click cell, then the content is switched between 2 values, somehow.

  • 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.