What does ajax. call mean? Solution

Source: Internet
Author: User
What does ajax. call mean ??? & Lt; tdalign = & quot; center & quot; & gt; & lt; imgsrc = & quot; images/{if $ link. ischeck} yes {else} no {/if}.gif & quot; onclick = & qu ajax. what does call mean ???
{$ Link. link_id}
This code calls the listTable. toggle function.

ListTable. toggle = function (obj, act, id)
{
Var val = (obj. src. match (/yes.gif/I ))? 0: 1;

Var res = Ajax. call (this. url, "act =" + act + "& val =" + val + "& id =" + id, null, "POST", "JSON", false );

If (res. message)
{
Alert (res. message );
}

If (res. error = 0)
{
Obj. src = (res. content> 0 )? 'Images/yes.gif ': 'Images/no.gif ';
}
}

Why is the I of/yes.gif/I used here, and what does ajax. call mean ???



------ Solution --------------------
Ecshop?
Var res = Ajax. call (this. url, "act =" + act + "& val =" + val + "& id =" + id, null, "POST", "JSON", false );
This is a method that has been blocked. it can be seen from the parameters.
This. the url is the request url.
Intermediate act = &...
POST method, return the JSON type
Null and false may be the callback function.

(Obj. src. match (/yes.gif/I ))? 0: 1;
This is a set of three items. check yes.gif in the src object.
/I is case-insensitive and is a regular expression content
If yes.gif exists in src, 0 is returned. otherwise, 1 is returned.

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.