我试图设置我的文本框的值从WebGrid im MVC 3.我能够使用Jquery获取数据。这些盒子会重置半秒。任何想法为什么?设置来自jquery的文本框值
$(".select").click(function() {
var contribution = $(".select");
var parent = contribution.parent();
var children = parent.children();
var Group = children.filter(':nth-child(2)');
var Level = children.filter(':nth-child(3)');
var effective = children.filter(':nth-child(6)');
var amount = children.filter(':nth-child(7)');
//alert(amount.html());
document.getElementById("GroupDescription").value = Group.html();
document.getElementById("LevelDescription").value = Level.html();
document.getElementById("Date").value = effective.html();
document.getElementById("Amount").value = amount.html();
});
你可能已经用'e.preventDefault();'很好的捕获它。 Upvoted;) – sg3s