开发者

Create an Acrobat button to insert the current date

开发者 https://www.devze.com 2022-12-18 06:14 出处:网络
I\'m building a report form in Acrobat and have a date field that I want to update by pressing form button on the page. (What I was thinking was a non-printing button.)

I'm building a report form in Acrobat and have a date field that I want to update by pressing form button on the page. (What I was thinking was a non-printing button.)

What Javascript would I ne开发者_JAVA技巧ed to place in the button to make it insert the current date in the date form field.


One option: on the Actions tab of the button enter JS-

var fld = this.getField("datefield");

fld.value = util.printd("yyyy/mm/dd",new Date());

Hope this helps,

Dimitri

www.pdfscripting.com

0

精彩评论

暂无评论...
验证码 换一张
取 消