如何使用jquery绑定数据。 [英] how to bind data using jquery.

查看:53
本文介绍了如何使用jquery绑定数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我通过webmethod获得结果。



现在我想绑定我的Home.aspx页面中的数据,如标题和图像。

我像转发器一样使用。

这是我的代码。





I am getting the result through webmethod.

Now I want to bind the data in my Home.aspx page like title and images.
I am using like a repeater.
This is my code.

<div class="art-left">
          <div class="article-sm-list">
            <ul>

              <li>
                <div class="article-sm">
                  <div class="art-sm-img"> <a href="#"><img src="images/small-article-img01.png" alt="art" /></a> </div>
                  <div class="art-sm-content"> <a href="#">Title</a>
                    <div class="art-sm-footer"> <a href="#"> <span><b>973K</b> SHARES/ <b>4</b> days ago</span></a> </div>
                  </div>
                </div>
              </li>

            </ul>
          </div>
        </div>





ajax和这样的jquery



ajax and jquery like this

var count=50;
              $.ajax({
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    url: "Home.aspx/GetBlogsInfo",
                    data: "{'count':'" + count + "'}",
                    dataType: "JSON",
                    async: true,
                    success: function (response) {
                    var res=response.d;
                    }
                    });





如何在成功函数中绑定数据。

需要任何html页面吗?如果我创建html页面我的css样式是否适用?

请帮帮我

谢谢....



how to bind the data in success function.
need any html page? If I create html page my css styles applied or not?
Please help me
Thank you....

推荐答案

.ajax({
type:POST,
contentType:application / json; charset = utf-8,
url:Home.aspx / GetBlogsInfo,
数据:{'count':'+ count +'},
dataType:JSON,
async:true,
成功:函数(响应) {
var res = response.d;
}
});
.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Home.aspx/GetBlogsInfo", data: "{'count':'" + count + "'}", dataType: "JSON", async: true, success: function (response) { var res=response.d; } });





如何绑定成功功能中的数据。

需要任何html页面吗?如果我创建html页面我的css样式是否适用?

请帮帮我

谢谢....



how to bind the data in success function.
need any html page? If I create html page my css styles applied or not?
Please help me
Thank you....






使用以下链接



http://www.mindfiresolutions.com/How-To-Set-Label-And-Value-In-jQuery -UI-Autocomplete-2454.php [ ^ ]



http://www.asphelps.com/Asp.Net/How-to-bind-dropdownlist-using- jquery-in-Asp.Net.aspx [ ^ ]


这篇关于如何使用jquery绑定数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆