이 기사에서는 JS가 페이지에서 DV를 구현하는 효과에 대해 설명합니다. 다음과 같이 참조에 대해 공유하십시오.
<스타일 유형 = "text/css"> body {margin : 0px;}#div1 {display : none; 위치 : 절대; Z- 인덱스 : 1000; 높이 : 100%; 너비 : 100%; 배경 : #000000; 필터 : 알파 (불투명도 = 30);}#div2 {디스플레이 : 없음; 위치 : 절대; 높이 : 100%; 너비 : 100%; 패딩 탑 : 10%; z-index : 1001;}#div3 {디스플레이 : 블록; 위치 : 절대; z-index : 999;} </style> <script type = "text/javaScript"> // 움직이는 객체를 정의하고 움직이는 좌표 var mouse_obj = "none", _ x, _y; // drag 객체 함수 (자동) 문서를 {mouse_obj! == "none") document.getElementById (mouse_obj) .style.left = _x+event.x; document.getElementById (mouse_obj) .style.top = _y+event.y; event.returnvalue = false; }} // 함수 드래그 중지 (자동으로) document.onmouseup = function () {mouse_obj = "none";} // 드래그 된 객체 함수가 드래그 된 객체 함수 m (o) {mouse_obj = o; _X = parseint (document.getElementById (mouse_obj) .style.left) -event.x; _y = parseint (document.getElementByid (mouse_obj) .style.top) -event.y;} </script> <div id = "div1"> </div> <div id = "div2"onmousedown = "m (this.id)"style = "left : 0px; top : 0px :"> <테이블 셀프 드 #ff7300; 위치 : 정적; 필터 : progid : dximagetransform.microsoft.dropshadow (color =#666666, offx = 4, offy = 4, positives = true) "align ="left "> <tr style ="cursor : ">"> "> <td> <font color ="</font> </font> <td align = "right"> <input type = "button"value = "x"onclick = "document.getElementById ( 'div1'). style.display = 'none'; geteLementById ( 'div2'). display = 'none';" Style = "Cursor : hand;"> "> </td> </tr> <td colspan ="2 "bgcolor ="#ffffff "align ="middle "> <a href ="// www.vevb.com "> // www.vevb.com </a> </td> </table> </div> </div> type = "button"value = "Open Layer"onclick = "document.getElementById ( 'div1'). style.display = 'block'; document.getElementById ( 'div2'). style.display = 'block';"> </div>JavaScript 관련 컨텐츠에 대한 자세한 내용은이 사이트의 주제를 확인하십시오. "JavaScript 스위칭 효과 및 기술 요약", "JavaScript 검색 알고리즘 기술 요약", "JavaScript 애니메이션 효과 및 기술 요약", "Javascript 오류 및 디버깅 기술의 요약" "JavaScript 기술의 요약" "" "요약" "", Malgority Sknickes의 요약 "". JavaScript Traversal 알고리즘 및 기술 "및"JavaScript 수학 연산 사용 요약 "
이 기사가 모든 사람의 JavaScript 프로그래밍에 도움이되기를 바랍니다.