const urlNode = document.createElement('a')
urlNode.setAttribute('href', 'http://xxx:8080')
const { host, protocol } = urlNode
const urlNode = document.createElement('a')
urlNode.setAttribute('href', 'http://xxx:8080')
const { host, protocol } = urlNode
本文标题:通过 a 标签巧妙获得链接的 host protocol
本文链接:https://www.haomeiwen.com/subject/hvvoghtx.html
网友评论