
本文实例讲解了jQuery实现简单的点赞效果的详细代码,具体内容如下
效果图:

下面提供一个”点赞”的实例代码,用ASP.NET MVC4 jQuery Ajax实现。
Model:
namespace MvcAjaxAdd.Models
{
public class ClickCountModel
{
[Key]
[DatabaseGeneratedAttribute(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Identity)]
public int ID { get; set; }
public string URL { get; set; }
public int? Num { get; set; }
}
}
View:
@{
ViewBag.Title = “Index”;
}
@model MvcAjaxAdd.Models.ClickCountModel
© 版权声明
文章版权归作者所有,未经允许请勿转载。
相关文章
暂无评论...