๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
728x90
๋ฐ˜์‘ํ˜•

๐Ÿ–ฅ๏ธํ”„๋ก ํŠธ์—”๋“œ/HTML | CSS | JAVASCRIPT28

์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - XPATH ๋ฌธ๋ฒ•์œผ๋กœ DOM ELEMENT ๊ฐ€์ ธ์˜ค๊ธฐ XPATH ๋ฌธ๋ฒ•์œผ๋กœ ๋‹จ์ผ ์š”์†Œ ๊ฐ€์ ธ์˜ค๊ธฐ function getElementByXpath(path){ return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; } console.log( getElementByXpath("//html[1]/body[1]/div[1]")); XPATH ๋ฌธ๋ฒ•์œผ๋กœ ๋‹ค์ค‘ ์š”์†Œ ๊ฐ€์ ธ์˜ค๊ธฐ function getElementsByXPath(xpath, parent) { let results = []; let query = document.evaluate(xpath, parent || document, null, XPathResult.ORDERED_NODE.. 2023. 11. 12.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - GET ํŒŒ๋ผ๋ฏธํ„ฐ ์ถ”์ถœํ•˜๊ธฐ let url = new URL("https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8&q=mdn%20query%20string") let params = new URLSearchParams(url.search); let sourceid = params.get('sourceid') // 'chrome-instant' let q = params.get('q') // 'mdn query string' let ie = params.has('ie') // true params.append('ping','pong') console.log(sourceid) console.log(q) console.log(ie) console.log(p.. 2023. 10. 26.
HTML - ํ‹ฐ์Šคํ† ๋ฆฌ ๋‹คํฌ๋ชจ๋“œ ํ† ๊ธ€ ๋ฒ„ํŠผ HTML ๐ŸŒ™ CSS /* ๋‹คํฌ๋ชจ๋“œ */ .dark body{ background-color: #161618 !important; color: rgb(255, 255, 255) !important; font-weight: 700 !important; } 2023. 9. 30.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋‚œ๋…ํ™” ์‚ฌ์ดํŠธ(obfuscator.io) ์‚ฌ์ดํŠธ ์ฃผ์†Œ https://obfuscator.io/ JavaScript Obfuscator Tool JavaScript Obfuscator Tool A free and efficient obfuscator for JavaScript (including support of ES2022). Make your code harder to copy and prevent people from stealing your work. This tool is a Web UI to the excellent (and open source) javascript-obfuscato obfuscator.io // Paste your JavaScript code here function hi() { console.log("Hello .. 2023. 9. 5.
CSS - ์ธ๊ธฐ ์žˆ๋Š” ๋””์ž์ธ ํ”„๋ ˆ์ž„์›Œํฌ(Tailwind CSS) https://tailwindcss.com/ Tailwind CSS - Rapidly build modern websites without ever leaving your HTML. Tailwind CSS is a utility-first CSS framework for rapidly building modern websites without ever leaving your HTML. tailwindcss.com https://flowbite.com/ https://flowbite.com/ flowbite.com 2023. 8. 28.
CSS - ๋ฏธ๋””์–ด์ฟผ๋ฆฌ ํ™•์ธ ์‚ฌ์ดํŠธ(mediaqueriestest.com) https://mediaqueriestest.com/CSS3 Media Queries Test on your browserCSS3 Media Queries is the heart of Responsive Design. This website will test all the features on your own browser, including screen dimensions, resolution and available extensions.mediaqueriestest.com 2023. 8. 28.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - XPath ๋‹ค๋ฃจ๊ธฐ, ๋ฐ˜์‘์†๋„ ํ…Œ์ŠคํŠธ ์‚ฌ์ดํŠธ ํ•ต ๋งŒ๋“ค๊ธฐ XPath ์„ ํƒ์ž์ธ $x๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•๋„ ์žˆ์ง€๋งŒ, setInterval ํ•จ์ˆ˜ ๋‚ด์— $x ์„ ํƒ์ž๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ํ•˜๋ฉด VM3146:2 Uncaught ReferenceError: $x is not defined at :2:12 ์ด๋ผ๋Š” ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€๊ฐ€ ๋‚˜์˜จ๋‹ค. ๊ทธ๋ž˜์„œ evaluate ๋ฉ”์„œ๋“œ๋ฅผ ์ด์šฉํ•ด XPath ํ‘œํ˜„์‹์œผ๋กœ ํŠน์ • ์š”์†Œ๋ฅผ ์ฐพ๋Š” ๋ฐฉ๋ฒ•์„ ๋Œ€์‹ ํ•  ์ˆ˜ ์žˆ๋‹ค. evaluate ํ•จ์ˆ˜ ๊ตฌ๋ฌธ evaluate(xpathExpression, contextNode, namespaceResolver, resultType, result) ๋งค๊ฐœ ๋ณ€์ˆ˜ xpathExpression - XPath ํ‘œํ˜„์‹์ด ์˜จ๋‹ค. contextNode - document ๊ฐ™์€ context ๋…ธ๋“œ๊ฐ€ ์ž…๋ ฅ๋œ๋‹ค. resultType - ๊ฒฐ๊ณผ ์œ ํ˜•์— ๋งž๋Š”.. 2023. 6. 23.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - http๋ฅผ https๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ if (window.location.protocol != "https:") { window.location.href = "https:" + window.location.href.substring(window.location.protocol.length); } if (document.location.protocol == 'http:') { document.location.href = document.location.href.replace('http:', 'https:'); } ์ถœ์ฒ˜: https://greendreamtrre.tistory.com/672 Javascript (์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ) HTTP ์ ‘์† ์‹œ HTTPS๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ ๋ณดํ†ต์€ ํ†ฐ์บฃ ์„œ๋ฒ„ ์„ค์ • ๋“ฑ์—์„œ ์ž๋™์œผ๋กœ ๋ฆฌ๋‹ค์ด๋ ‰ํŠธ ์‹œํ‚ค๋„๋ก ํ•˜์ง€๋งŒ ๊ฐ ํŽ˜์ด์ง€๋งˆ๋‹ค.. 2023. 5. 18.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - ํ˜„์žฌ script ํƒœ๊ทธ ์‚ญ์ œํ•˜๊ธฐ 2023. 4. 4.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - SMS ๋ฌธ์ž ๋ณด๋‚ด๊ธฐ SMS๋ณด๋‚ด๊ธฐ location.href = sms:์ˆ˜์‹ ์ž๋ฒˆํ˜ธ?body=๋ณด๋‚ผ๋ฉ”์„ธ์ง€; ์ถœ์ฒ˜: https://ttowa.tistory.com/m/entry/JS-%EC%9B%B9Mobile%EC%97%90%EC%84%9C-SMS-%EB%AC%B8%EC%9E%90%EB%B3%B4%EB%82%B4%EA%B8%B0 [JS] ์›น(Mobile)์—์„œ SMS ๋ฌธ์ž๋ณด๋‚ด๊ธฐ 1.Android(์•ˆ๋“œ๋กœ์ด๋“œ) SMS๋ณด๋‚ด๊ธฐ location.href = sms:์ˆ˜์‹ ์ž๋ฒˆํ˜ธ?body=๋ณด๋‚ผ๋ฉ”์„ธ์ง€; 2.IOS(์•„์ดํฐ) SMS๋ณด๋‚ด๊ธฐ location.href = sms:์ˆ˜์‹ ์ž๋ฒˆํ˜ธ&body=๋ณด๋‚ผ๋ฉ”์„ธ์ง€; 3.Android & IOS ์ž๋™ ๋ถ„๊ธฐ ์‹ค์ œ ๋””๋ฐ”์ด์Šค์—์„œ ํ…Œ์ŠคํŠธ ํ•ด ttowa.tistory.com 2023. 3. 2.
CSS - :before๋ฅผ ์ด์šฉํ•œ ์ฑ„ํŒ…์ฐฝ ๋งํ’์„  ๊ผฌ๋ฆฌ ๋งŒ๋“ค๊ธฐ .parent { height: 20px; width: 100px; background-color: #080; position: relative; } .child { position: absolute; width: 80px; height: 200px; background-color: #008; left: 50%; /* note 50% */ top: 30px; margin-left: -20px; /* 2x your arrow size */ } .child:before { position: absolute; border-right: 10px solid transparent; border-bottom: 10px solid #008; border-left: 10px solid transparent; top: -.. 2023. 2. 5.
์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ - ๋ธŒ๋ผ์šฐ์ € ํƒญ์ด ํ™œ์„ฑํ™”์ธ์ง€ ํ™•์ธํ•˜๊ธฐ(document.hidden) if (document.hidden) console.log('๋น„ํ™œ์„ฑํ™”'); else console.log('ํ™œ์„ฑํ™”'); ์ถœ์ฒ˜: https://stackoverflow.com/questions/1760250/how-to-tell-if-browser-tab-is-active How to tell if browser/tab is active Possible Duplicate: Is there a way to detect if a browser window is not currently active? I have a function that is called every second that I only want to run if the current page is in the stackoverflow.com 2023. 2. 5.
728x90
๋ฐ˜์‘ํ˜•