无法使用jQuery获取列表项的值 [英] Not able to get the list item value using jquery

查看:63
本文介绍了无法使用jQuery获取列表项的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,小组成员,

从最近几天开始,我一直在为一个已经存在的项目进行非常艰苦的工作.这是将SharePoint与jquery一起使用的方法.尽管我是jquery的新手,但我仍然能够获得结果.我的任务是从列表和列表中获取值.我几乎已经完成了使用jquery从列表中获取列表项值的代码.但是最后我无法获取列表项的值.下面是代码,在警报消息中,而不是AI的值正在警报消息为未定义"

var i = $(this).attr(''A'');
警报(i);


请问有人可以帮我是下一行是否正确,以获取列表项值

Hi group members,

From last few days I have been working very hard on already existed project.Which is done using jquery with SharePoint.How ever I am able to get the result though i am new to jquery.I have a task of getting values from a list and I have almost done the code to get the list item value from the list using jquery.But the end i am not able to get the value of list item.Below is the code,In the alert message instead of value of A I am getting alert message as "Undefined"

var i=$(this).attr(''A'');
alert(i);


Can any one help me is the below line correct to get the list item value

推荐答案

(this).attr(''A'');
警报(i);


谁能帮我得到下面列出的值正确吗?
(this).attr(''A'');
alert(i);


Can any one help me is the below line correct to get the list item value


这与列表项或共享点无关.访问 http://query.com [ ^ ],您会发现很多示例
This has nothing to do with list items or sharepoint. Visit http://query.com[^] and you will find plenty of examples


正如之前所说,您可以使用ECMA-Scripts处理共享点
(如果要在客户端获取数据)

如果您是,请尝试查看此链接:
http://www.learningsharepoint.com/2011 /05/16/get-all-list-items-using-ecmascript-sharepoint-2010/ [
as mark said before , you can deal with sharepoint by using ECMA-Scripts
(if you want to get data in client side)

if you are , try to look at this link :
http://www.learningsharepoint.com/2011/05/16/get-all-list-items-using-ecmascript-sharepoint-2010/[^]

or you can get data in server side by object model
using Classes like : SPContext , SPSite, SPWeb ,SPList ,SPListItemCollection
,SPListItem and so on.

try one of these solution , and it will be done succefully.

if you want to share your task in a little bit of details , i can help

you get the best solution.

do not hesitate to ask a question , do not worry.


这篇关于无法使用jQuery获取列表项的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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