get-anchor:通过href和可选查询获取锚点

时间:2021-05-24 17:11:29
【文件属性】:
文件名称:get-anchor:通过href和可选查询获取锚点
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-24 17:11:29
JavaScript 得到锚 通过href和可选获取锚点。 安装 $ npm install get-anchor 用法 const getAnchor = require ( 'get-anchor' ) // create an anchor on the DOM const anchorEl = document . createElement ( 'a' ) anchorEl . setAttribute ( 'href' , '#oh-my-element' ) document . body . appendChild ( anchorEl ) getAnchor ( 'oh-my-element' ) // => 原料药 getAnchor(href [,query]) 通过href和可选获取锚点。 返回第一个匹配项。 也可以看看
【文件预览】:
get-anchor-master
----.gitignore(164B)
----package.json(667B)
----.travis.yml(158B)
----LICENSE(1KB)
----index.js(385B)
----test.js(1KB)
----README.md(2KB)

网友评论