gpt4 book ai didi

Can someone try .padStart javascript in Adobe pro?(有人可以在Adobe Pro中试用.padStart javascript吗?)

转载 作者:bug小助手 更新时间:2023-10-26 20:14:55 25 4
gpt4 key购买 nike



var n = 11; 
this.getField("Text1").value = n;
var pad = String(n).padStart(3, '0');
this.getField("Text2").value = pad;

shouldn't the above produce: [in Text 1] 11, [in Text 2] 011? it does nothing for me.

上面不应该产生:[在文本1]11,[在文本2]011吗?这对我一点用处都没有。


and this:

还有这个:


this.getField("Text3").value = String(1).padStart(3, '0');

should produce: [in Text 3] 001? again, does nothing for me.

应产生:[在文本3中]001?再说一次,对我没有任何帮助。


why would the fields (Text 2 and Text 3) be blank for me?

为什么我的字段(文本2和文本3)为空?


更多回答

IIRC, Adobe products don't use JS, but extendscript, a subset of modern JS which is based on and locked at ES3 (1999). .padStart() was, on the other hand, added in ES6 (2015)...

IIRC,Adobe产品不使用JS,而是使用扩展脚本,这是现代JS的一个子集,它基于并锁定在ES3(1999)上。另一方面,.padStart()是在ES6(2015)中添加的...

优秀答案推荐
更多回答

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