Problems related to ajax + php refreshing. Qiniu

Source: Internet
Author: User
Ajax + php without any new problems .... Find Daniel & lt; div & nbsp; class = 'petz _ Box' & gt; & nbsp; & lt; div & nbsp; class = "petz_img & nbsp; fillet" & gt; ajax + php refreshing problems .... Qiniu


"Alt =" ">

<{$ Volist. pictit}>



"> Like
<{$ Volist. num}>


<{/Foreach}>


$ (Function (){

$ (". Xh"). bind ('click', function (){
Var id = $ (this). attr ('vv ');
$. Ajax ({
Type: 'post ',
Url: '_ URL _/addnum ',
Data: 'Id = '+ id,
// DataType: "json ",
Success: function (res ){
Var I = res; // The value returned by the server

$ (This). next (). text (I); // why can't I change the value of the html page without refreshing the status ???

}
});
});

});
Script
In addition, each member can only click once and cannot click next time. Share:
------ Solution --------------------
$ (This). next (). text (I );
Who do you think this $ (this) is?
Isn't it $. ajax?
------ Solution --------------------
In addition, each member can only click once and cannot click next time.

Directly Create an onclick event and click it to remove the innerHTML link.
Related Article

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.