Let tableObj=document. GetElementById (" tableId ");
Let rows=tableObj. Rows;
For (the let I=1; i
Let the id=cells [0]. InnerHTML;
Let Vessel=cells [1]. The innerHTML;
Let Voyage=cells [2]. InnerHTML;
Let CtnWegtCla=cells [3]. The innerHTML;
Let CtnSize=cells [4]. InnerHTML;
Let CtnWegtRanLeft=cells [5]. The getElementsByTagName (" input ") [0]. Value;
Let CtnWegtRanRight=cells [6]. GetElementsByTagName (" input ") [0]. Value;
Let data={
https://bbs.csdn.net/topics/'id: id,
'Vessel, Vessel,
'Voyage: Voyage,
'CtnWegtCla: CtnWegtCla,
'CtnSize: CtnSize,
'CtnWegtRanLeft: CtnWegtRanLeft,
'CtnWegtRanRight: CtnWegtRanRight,
};
$. Ajax ({
Url:/berth/add_port_grade "/",
Type: "POST",
Data: JSON. Stringify (data),
Success: the function () {
Alert (' submit success);
$(this). The remove ();
Let tbodyObj=document. GetElementsByTagName (' tbody ');
Let newTr=document. The createElement method (' tr);
Let newTd=`
{1}
`;
NewTr. InnerHTML=newTd;
TbodyObj [0]. The appendChild (newTr);
}
})
}})
CodePudding user response:
Is anyone here [face] monkey2:002 PNG [/face]- Related
- Links:
- CodePudding