[JQuery] Selectors 링크
ITWeb/개발일반 2021. 2. 15. 11:03https://www.w3schools.com/jquery/jquery_ref_selectors.asp
http://gregfranko.com/jquery-best-practices/#/5
저는 주로 id selector 를 사용 합니다.
'dom'에 해당되는 글 7건[JQuery] Selectors 링크ITWeb/개발일반 2021. 2. 15. 11:03https://www.w3schools.com/jquery/jquery_ref_selectors.asp
저는 주로 id selector 를 사용 합니다.
JavaScript DOMITWeb/개발일반 2008. 2. 20. 17:34•Node
–-Retrieving nodes
§document.getElementById(id)
§document.getElementsByName(name)
§node.getElementsByTagName(tagName) •Node
–Document tree structure •Node
–-child, sibling, parent •Walk the DOM
–-Using recursion, follow the firstChild node, and then the nextSibling nodes.
§function walkTheDOM(node, func) {
§ func(node);
§ node = node.firstChild;
§ while (node) {
§ walkTheDOM(node, func);
§ node = node.nextSibling;
§ }
§} •Style
–-node.className
–-node.style.stylename
–-node.currentStyle.stylename Only IE
–-document.defaultView(). getComputedStyle(node, ""). getPropertyValue(stylename);
§var oDiv = document.getElementById("div1");
§var nHeight = document.defaultView.getComputedStyle(oDiv, null).getPropertyValue("height"); Style names
CSS
•background-color
•border-radius
•font-size
•list-style-type
•word-spacing
•z-index JavaScript
•backgroundColor
•borderRadius
•fontSize
•listStyleType
•wordSpacing
•zIndex •Making elements
–-document.createElement(tagName)
§var hr = document.createElement("hr");
§document.body.appendChild(hr);
–-document.createTextNode(text)
§var txt = document.createTextNode("Hello!");
§document.body.appendChild(txt);
–-node.cloneNode(deep);
§cloneNode(true) clones the whole subtree rooted at the node
§cloneNode(false) only the node itself (and any attributes if it is an element) is cloned
–curr_node = root.firstChild;
–var new_node = curr_node.cloneNode(true);
–root.appendChild(new_node); •Linking elements
–-node.appendChild(new)
–-node.insertBefore(new, sibling)
–-node.replaceChild(new, old)
–-old.parentNode.replaceChild(new, old)
•Removing elements
–-node.removeChild(old)
–-old.parentNode.removeChild(old) •innerHTML
–-The W3C standard does not provide access to the HTML parser.
–-All A browsers implement Microsoft's innerHTML property. 내장객체, BOM, DOM, 사용자 정의 객체ITWeb/개발일반 2008. 2. 20. 16:47•자바스크립트 내장 객체
–-Number
–-String
–-Date
–-Array
–-Boolean
–-Math
–-RegExp •브라우저 객체 모델(BOM) 객체
-window
§document
–forms
–cookie
–links/anchors
–images
§navigator
§location
§frames
§screen
§history The Document Object Model (DOM) is an API for HTML and XML documents.
-Core DOM
§defines a standard set of objects for any structured document
-XML DOM
§defines a standard set of objects for XML documents
-HTML DOM
§defines a standard set of objects for HTML documents
•개발자가 만든 사용자 정의 객체
–-JavaScript objects 와 prototype.
§YAHOO.util.Connect = {
– _msxml_progid:[],
– _http_headers:{},
– _has_http_headers:false,
– setProgId:function(){…}
–}
§Profiler = function () {
– var getProfilers; // private
– this.getProfiler = function () {…} // public
–}
§String.prototype.trim = functoin () {…}
§Profiler = new Object();
–Profiler.title = “YAHOO”;
–Profiler.author = “Jerry”; XML DOM Node TypesITWeb/개발일반 2007. 12. 6. 14:41dynamic 하게 dom 객체를 생성하거나 해서 삽입하고 할때 알고 있어야 하는 코드들이라서 올려 봅니다.
뭐 저 한테 필요한 거라 이곳에 기록해 두기는 하는 거지만 DOM 을 공부 하시는 분들은 필요한 정보 같아 공유해 봅니다. ref. http://www.w3schools.com/dom/dom_nodetype.asp Node TypesThe following table lists the different W3C node types, and which node types they may have as children:
Node Types - Return ValuesThe following table lists what the nodeName and the nodeValue properties will return for each node type:
NodeTypes - Named Constants
DOM Client Object Cross-Reference:documentITWeb/개발일반 2007. 9. 6. 00:06DOM Client Object Cross-Reference:documentFrom MDC
ref. http://developer.mozilla.org/en/docs/DOM_Client_Object_Cross-Reference:document [강좌] debug 창ITWeb/개발일반 2007. 4. 6. 15:26간단한 prototype 만 있습니다.
http://www.junetool.com/splv/debug.html 1. 개요 alert 형태의 client debugging 이 불편해서 브라우저에 디버그 창을 띄워 놓고 메시지를 출력한다. 2. 특성 심플하다. 3. 라이센스 그런거 없고 막 가져다 쓰고 임의 수정해도 무관하다. ^^* 4. version 0.0.1 5. 첨부된 파일 *.js 는 javascript class 또는 package 이고, *.html 은 샘플 prototype - debug.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>javascript::debug</title> </head> <script src="web.js"></script> <script src="web.util.js"></script> <script src="web.util.element.js"></script> <script src="web.util.debug.js"> </script> <body> <input type=button value="DEBUG WINDOW ON/OFF" onclick="web.util.debug.init('oWebDebug')"> <br> <input type=button value="DEBUG LOGGING" onclick="web.util.debug.log('test')"> <br> <input type=button value="DEBUG CLEAN" onclick="web.util.debug.set_clean()"> <br> <input type=button value="DEBUG TIME SWITCH" onclick="web.util.debug.set_time_switch()"> <br> <input type=button value="DEBUG CLOSE SWITCH" onclick="web.util.debug.set_close()"> </body> </html> |