js-重置FORM表单--通用

//reset
		function resetControl() {
			var Form1 = document.getElementById('query_form');
		    var obj = null;
		    for (var i = 0; i <= Form1.elements.length - 1; i++) {
		        obj = Form1.elements[i];
	        	 if (obj.tagName == "INPUT" && obj.type == "text") {
		            obj.setAttribute("value", "");
		        }
		    }
		}

你可能感兴趣的:(JS)