1
자바 스크립트 기반의 체크 박스를 만들려고하고 있지만 어떻게 든 작동하게 만들 수는 없습니다. 이전에 질문을 만들었지 만 의견에 코드를 추가 할 수 없으므로 새로운 질문을 던집니다. 이것은 내가 한 일입니다 :자바 스크립트 및 Dhtmlx로 체크 박스 만들기
function eXcell_includeDC(cell) {
if (cell){ // the default pattern, just copy it
this.cell = cell;
this.grid = this.cell.parentNode.grid;
}
this.getValue = regExpGetValueCell;
if (this.getValue = 'Y') {
var myDiv = document.getElementById("includeDC");
var checkbox = document.createElement("input");
checkbox.setAttribute("type", "checkbox");
checkbox.setAttribute("name", "dd");
checkbox.setAttribute("value", "ff");
checkbox.checked = true;
myDiv.appendChild(checkbox);
checkbox.checked = true;
} else {
var myDiv = document.getElementById("includeDC");
var checkbox = document.createElement("input");
checkbox.setAttribute("type", "checkbox");
checkbox.setAttribute("name", "dd");
checkbox.setAttribute("value", "ff");
checkbox.checked = true;
myDiv.appendChild(checkbox);
checkbox.checked = false;
}
this.isDisabled = function() {
return true;
}
this.setValue=function(val) {
// actual data processing may be placed here, for now we just set value as it is
this.setCValue(val);
}
}
eXcell_includeDC.prototype = new eXcell;
굉장! 이것은 큰 도움이되었습니다! :) –