在将数据放入转发器时使用jquery将值分配给文本框 [英] to assign the value to a textbox using jquery when it is placed in a repeator

查看:68
本文介绍了在将数据放入转发器时使用jquery将值分配给文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI,





var name = $(this).attr('id');

var txt = $(input [id $ ='txtShareMessage'])。val(name);







当我使用上面的脚本行使用jquery将值分配给文本框时,文本框被置于重复器中而没有获取值并且正在获取对象[对象]警报如何解析为文本框赋值在repeator




var name=$(this).attr('id');
var txt= $("input[id$='txtShareMessage']").val(name);



when i used above script lines to assign the value to a textbox using jquery and textbox is placed in repeator not getting the value and am getting object [object] in alert how can i resolve to assign value to textbox which is in repeator

推荐答案

(this).attr('id');

var txt =
(this).attr('id');
var txt=


(input [id
("input[id


='txtShareMessage'])。val(name);







当我使用上面的脚本行使用jquery将值分配给文本框时,文本框被置于重复器中而没有获取值并且正在获取对象[object]的警告如何我可以决定将值分配给处于重复的文本框
='txtShareMessage']").val(name);



when i used above script lines to assign the value to a textbox using jquery and textbox is placed in repeator not getting the value and am getting object [object] in alert how can i resolve to assign value to textbox which is in repeator


这篇关于在将数据放入转发器时使用jquery将值分配给文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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