반응형
Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Netty
- netflix oss
- vue.js
- redis
- Docker Compose
- jmeter
- spring boot
- Redis Sentinel
- spring boot redis
- Spring Open Feign
- JPA
- docker compose mysql
- MySQL
- coalesce
- grafana
- WebLogic
- argo cd
- docker
- docker-compose
- spring cloud
- weblogic 10
- Hibernate
- Selenium
- Airflow
- cassandra
- ChannelPipeline
- KAFKA
- RabbitMQ
- mybatis
- QueryDSL
Archives
- Today
- Total
IT.FARMER
javascript Node copy 후 click event 변경 혹은 event 없애기 본문
반응형
function moveChoiceUser(obj){
var trObj = obj.cloneNode(true);
var changePointDiv = $("choiceUserListTbody");
trObj.removeAttribute("onclick",moveChoiceUser,false);
trObj.onclick = function(){deleteChoiceUser(this);};
alert(trObj.getAttribute("onclick"));
changePointDiv.appendChild(trObj);
}
var trObj = obj.cloneNode(true);
var changePointDiv = $("choiceUserListTbody");
trObj.removeAttribute("onclick",moveChoiceUser,false);
trObj.onclick = function(){deleteChoiceUser(this);};
alert(trObj.getAttribute("onclick"));
changePointDiv.appendChild(trObj);
}
clonNode : 복사 할때 사용 하는 Method, true 일경우 하위 노드 모두 복사 false 일경우 하위 노드 복사 안함
* fireFox에서 event 삭제할경우..
$ ( "top_menu_4"). removeEventListener ( "onclick", main_menu_select,false))
* Exp 및 기타...등등 표준이니까 다될듯.
trObj.removeAttribute("onclick",moveChoiceUser,false);
trObj.onclick = function(){deleteChoiceUser(this);};
removeAttribute로 삭제 해줘도 이벤트는 먹히더라.
결국 trObj.onclick = ""; 으로 사용 하니 아무 이벤트 사라짐.
즉. onclick = function () {블라블라();}; 해서 사용 하면됨
반응형
'JavaScript > script' 카테고리의 다른 글
mehtod Get 방식의 Encoding Decoding 방식. [URLDecoder, URLEncoder] (0) | 2011.04.08 |
---|---|
javascript <script 속성> (0) | 2011.03.04 |
javascript 웹페이지의 선택된 node 옴기기 (0) | 2010.10.19 |
javascript 인,디 코드 (0) | 2010.09.27 |
javascript 날짜 between 유사기능 (날짜와 날짜 사이) (0) | 2010.09.24 |