Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
478 views
in Technique[技术] by (71.8m points)

javascript - 在Web上添加PDF表单字段边框(如果删除),边框将被删除。(adding a PDF form field border on web, if deleted, border is removed.Works on desktop, not on website)

I will start by saying I don't know CSS or JS.

(首先,我说我不懂CSS或JS。)

I have muddled through and found how to make a PDF form field change text color and add a black border when text is added.

(我已经弄明白了,发现如何在添加文本时使PDF表单字段更改文本颜色并添加黑色边框。)

If that text is deleted, the border disappears.

(如果删除了该文本,则边框消失。)

It works fine on the desktop, but when added to the web, the border does not work.

(它在桌面上可以正常工作,但是当添加到网络上时,边框不起作用。)

I have added the following text to the Text Field Properties/Format/Custom/Custom Keystroke Script

(我已将以下文本添加到“文本字段属性/格式/自定义/自定义按键脚本”中)

var colorField = event.target; 
colorField.textColor = color.red; 
colorField.strokeColor = color.red;

if (event.value != "")


{ 
colorField.strokeColor = color.black; 

} 
else 
{ 

colorField.strokeColor = color.transparent; 
}

Does CSS need to be added to make this work?

(是否需要添加CSS才能使其正常工作?)

I am willing to pay for helping make this work if that is allowed.

(如果允许的话,我愿意为帮助使这项工作付出代价。)

Thank you.

(谢谢。)

  ask by carl french translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...