Home > Web Front-end > JS Tutorial > body text

jquery gets the control value in tr and operates tr implementation idea_jquery

WBOY
Release: 2016-05-16 17:39:08
Original
1347 people have browsed it
复制代码 代码如下:





































Material/Special Tool Rental/Tool Cantainer/Transportation/Mobile

Project No


选择

Final Custome:

Label

Order No.

Label

Project Leaing Time:

Label

Exchange Rate:8.3000

item

Description

QTY

Unit

Total

Remark

NewItem







 
保存 | 删除


复制代码 代码如下:

function SaveItem(index) {
var tr = $("tr[id=" index "]");
var innerid = tr.find('input[ID$=txtInnerID]').val();
var item = tr.find("select[id*=selItem]").val();
var des = tr.find('input[ID$=txtDescription]').val();
var qty = tr.find('input[ID$=txtQTY]').val();
var unit = tr.find('input[ID$=txtUnit]').val();
var total = tr.find('input[ID$=txtTotal]').val();
var remark = tr.find('input[ID$=txtRemark]').val();
//alert(innerid "/" item des qty unit total remark);
//验证项目编号
var proinnerid = $("#hidProjectInnerID").val();
if (proinnerid == "") {
$("#txtProjectNo").removeClass("Field");
$("#txtProjectNo").addClass("Error");
return false;
}
/*
jQuery.ajax({
type: 'get',
url: '../Handler/ProjectReport.ashx',
data: { "key": "save", "proinnerid": $("#hidProjectInnerID").val(), "innerid": innerid, "type": type, "content": content, "startdate": startdate, "enddate": enddate, "remark": remark },
cache: false,
success: function (result) {
var jsonobj = eval(result);
if (jsonobj[0].result == "true")
alert("Sueecss");
else
alert("Error");
}
});
*/
}
function DelItem(index) {
var tr = $("tr[id=" index "]");
//var innerid = tr.find('input[ID$=txtInnerID]').val();
$("tr[id=" index "]").remove();
}
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template