반응형
m.logPrint() is working!
<eq> and <eqq> tags are rendered to MathJax format, being enclosed by \ ( \ ) and \ [ \ ].
docuK-1 scripts started!
If this log is not closed automatically, there must be an error somewhere in your document or scripts.
Table of Contents is filled out.
Auto numberings of sections (div.sec>h2, div.subsec>h3, div.subsubsec>h4), <eqq> tags, and <figure> tags are done.
<cite> and <refer> tags are rendered to show bubble reference.
<codeprint> tags are printed to corresponding <pre> tags, only when the tags exist in the document.
Current styles (dark/bright mode, font-family, font-size, line-height) are shown.
disqus.js with id="disqus-js" is loaded.
kakao.js with id="kakao-jssdk" is loaded.
New ShortKeys (T: Table of Contents, F: Forward Section, D: Previous Section, L: To 전체목록/[Lists]) are set.
m.delayPad=512;
m.wait=1024;
wait 1196ms.
<eq> and <eqq> tags are rendered to MathJax format, being enclosed by \ ( \ ) and \ [ \ ].
docuK-1 scripts started!
If this log is not closed automatically, there must be an error somewhere in your document or scripts.
Table of Contents is filled out.
Auto numberings of sections (div.sec>h2, div.subsec>h3, div.subsubsec>h4), <eqq> tags, and <figure> tags are done.
<cite> and <refer> tags are rendered to show bubble reference.
<codeprint> tags are printed to corresponding <pre> tags, only when the tags exist in the document.
Current styles (dark/bright mode, font-family, font-size, line-height) are shown.
disqus.js with id="disqus-js" is loaded.
kakao.js with id="kakao-jssdk" is loaded.
New ShortKeys (T: Table of Contents, F: Forward Section, D: Previous Section, L: To 전체목록/[Lists]) are set.
m.delayPad=512;
m.wait=1024;
wait 1196ms.







Mode: Bright; Font: Noto Sans KR; font-size: 18.0px (10.0); line-height: 1.6;
width: 1280, height: 720, version: 2.12.18
Canonical URI: https://kipid.tistory.com/entry/URL-URI-parser-URL-의-href-origin-protocol-host-hostname-port-pathname-search-hash-뽑아내기
dg:plink (Document Global Permanent Link): https://kipid.tistory.com/300
document.referrer: Empty
width: 1280, height: 720, version: 2.12.18
Canonical URI: https://kipid.tistory.com/entry/URL-URI-parser-URL-의-href-origin-protocol-host-hostname-port-pathname-search-hash-뽑아내기
dg:plink (Document Global Permanent Link): https://kipid.tistory.com/300
document.referrer: Empty







URL | URI parser (URL 의 href, origin, protocol, host, hostname, port, pathname, search, hash 뽑아내기)
URL | URI 에서 href, origin, protocol, host, hostname, port, pathname, search, hash 을 알아내고 싶을때가 있는데, javascript 단에서 제공하는 function 이 분명 존재할거라 생각해서 스스로 짜보다가 chatGPT 통해서 물어보고 알게 된 것 공유.
Table of Contents
T1.URL 의 기본구조
▼ Show/Hide
// The entire URL [href]=[protocol]//[hostname]:[port][/pathname][?search][#hash] =[protocol]//[host][/pathname][?search][#hash] =[origin][/pathname][?search][#hash] // Host [host]=[hostname]:[port] // Origin [origin]=[protocol]//[hostname]:[port] =[protocol]//[host]
▲ Hide
T2.How to get href, origin, protocol, host, hostname, port, pathname, search, hash from URL?
▼ Show/Hide
m.analysisURL=function (url) { let parser=document.createElement('a'); parser.href=url; let res={}; res.href=parser.href; res.origin=parser.origin; res.protocol=parser.protocol; res.host=parser.host; res.hostname=parser.hostname; res.port=parser.port; res.pathname=parser.pathname; res.search=parser.search; res.hash=parser.hash; return res; };
▲ Hide
TRefs.References and Related Articles
▼ Show/Hide







반응형
'[IT/Programming] > HTML related' 카테고리의 다른 글
인터넷에서 예쁘게 코드 입력하기 (google code prettify) (1) | 2023.11.04 |
---|---|
Learning AJAX (1) | 2023.11.04 |
Referer 알아내기 in Server (Vert.x) and Client (HTML/javascript) (0) | 2023.11.04 |
HTML id 에 한글이나 encodeURIComponent, %, \s, [, ], !, @, #, $, %, ^, &, *, (, ), -, _, +, =, \, /, ?, ~, :, ;, ", ', <, >, ,, . 등 특수문자 (special characters) 들어갈 수 있는지 테스트 해보기 (0) | 2023.11.04 |
Spread syntax ... operator in Javascript (0) | 2023.10.30 |
Formatting the lyrics to Recoeve.net style (genius.com) (1) | 2023.10.29 |
Retrieving the title and singer from Spotify (0) | 2023.10.27 |