Home > Web Front-end > HTML Tutorial > Form submission, only submit the rows selected by the check box_html/css_WEB-ITnose

Form submission, only submit the rows selected by the check box_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-24 11:57:21
Original
1948 people have browsed it

There are multiple pieces of data traversed using in the form. There is a checkbox on the form. How can I submit only the rows of data I selected? ? ?


Reply to discussion (solution)

I found that he would submit everything once I submitted it. But only the selected checkboxes are on, and the unselected ones are not

In the submission event, remove the names of the unselected rows

Thank you for the reminder! ! ! ! Solved
This is the method code

 $("#jiesuan").click(function(){    	alert("结算");    	  //复选框的name='od'      	$("input[name='od']").each(function(){		    if($(this).attr("checked")== 'checked'){		    	//是选中		    }else{		    	//       td       tr   		        $(this).parent().parent().find("input").removeAttr("name");		   	}		});    });
Copy after login

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