Programming/JavaScript, Sencha

JavaScript - Form Object 접근과 제어

파란크리스마스 2009. 5. 13. 10:57
728x90
출처 : http://igniter.egloos.com/7306760

//
document.forms["form1"].elements["userid"]; 

// 
var obj = document.getElementById("userid");

//
var frm = document.forms["form1"];
for ( i=0; i < frm.length; i++){ 
  var type = "element type : " + frm[i].type + "\n\n";
  var name = "element name : " + frm[i].name + "\n\n"; 
  var value = "element value : " + frm[i].value + "\n\n";