Programming/JavaScript41 문자 byte 수 체크하기 function check_msglen() { var length = calculate_msglen(document.getElementById('content').value); document.getElementById('byte').value = length; } function calculate_msglen(message) { var nbytes = 0; for (i=0; i 4) { nbytes += 2; } else if (ch != '\r') { nbytes++; } } return nbytes; } ================================== onkeyup="(12, this.name);" // 제한 byte 길이, 객체 이름 // 글자 byte 계산 function chec.. 2013. 12. 5. Table insertRow() Method Definition and UsageThe insertRow() method inserts a new row at the specified index in a table.SyntaxtableObject.insertRow(index) ValueDescriptionindexAn integer that specifies the position of the row to insert (starts at 0). The value of -1 can also be used; which result in that the new row will be inserted at the last position. This parameter is required in Firefox and Opera, but optional in I.. 2013. 11. 27. ajax 사용법 Getting Started with AJAX using Java21/07/2010AJAX is an acronym for Asynchronous JavaScript And XML. AJAX provides an ability to communicate with the server asynchronously. Here asynchronous is the keyword. To explain that in simple terms, you can send a request to server and continue user interaction with the user. You need not wait for response from the server. Once the response arrives, a de.. 2013. 11. 8. 동적 폼 추가 삭제 웹프로그래밍을 하다보면, 자료실 같은 것을 구현할 때 동적으로 폼을 추가하고 삭제 하고 싶을 때가 있다..단지 동적으로 추가만 할경우에는 에 계속 innerHTML을 이용해서 추가만 하면 되지만..삭제가 들어가면 이게 또 복잡해 진다..그래서 DOM(Document Object Model)을 이용한 document.createElement() 함수를 이용하여 동적으로 div를생성하여 삭제 해보았다.혼자서 생각한거라, 또 쉬운걸 괜히 복잡하게 짠건 아닌지 걱정;;; 다른 방법 있으신 분은 얼른 얼른 댓글로 수정 부탁드립니다. ------------------------------------------------------------------------------------------------------.. 2013. 10. 30. 이전 1 ··· 4 5 6 7 8 9 10 11 다음