gpt4 book ai didi

javascript - javascript 中的 $$$ 是什么

转载 作者:行者123 更新时间:2023-11-30 11:19:56 25 4
gpt4 key购买 nike

know $ 作为 jQuery 的别名.

谁能告诉我三美元在 java 脚本中是什么意思?我看到以下两项都有效。

var stxx = new CIQ.ChartEngine({ container: $$$("#idOfDev") });
var stxx = new CIQ.ChartEngine({ container: $$$(".classAppliedToDev") });

他们都在选择 id 或 class 应用到的 dev。

但奇怪的是,当我将它设为单个 $ 而不是三个 $$$ 时,它就无法工作了。

最佳答案

您似乎在引用 ChartIQ SDK。查看他们的文档,他们提供了这些变量背后的解释

http://documentation.chartiq.com/global.html#__$__anchor

$$(id [, source])

Shorthand for getElementById(). Equivalent to prototype style $() which is faster but less powerful than jquery style $()

然后

$$$(selector [, source])

Functional equivalent of querySelector(). Functionally equivalent to jquery $(). This uses querySelectorAll in order to maintain compatibility with IE 9. Note that if multiple objects match the selector then only the first will be returned.

关于javascript - javascript 中的 $$$ 是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50185235/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com