PDF 中的 JavaScript
我目前正在创建一个 PDF 文档,其中包含我想发布到 aspx 页面中的字段。现在,我已经使用带有添加行为“提交表单”的按钮成功地工作了。我想对此进行调整,以便在提交表单之前弹出一条确认消息,单击“否”将中止提交,单击“是”将提交表单。
我想我需要在 javascript 中执行此操作,所以我一直在挖掘并提出以下内容;
var answer = app.alert("Are you ready to submit this form now?", 2, 2, "Confirmation");
if(answer!=4)
this.submitForm("http://localhost:8018/quote/apply.aspx");
我认为我的submitForm 函数是垃圾。我该如何改进它?
I am currently creating a PDF document which has fields on it which I'd like to post into an aspx page. Now this bit I have working successfully using a button with the added behaviour 'Submit Form'. I want to tweak this so before the form is submitted a confirmation message pops up, clicking no will abort the for submit, clicking yes will submit the form.
I figure I need to do this in javascript so I've been digging around and come up with the following;
var answer = app.alert("Are you ready to submit this form now?", 2, 2, "Confirmation");
if(answer!=4)
this.submitForm("http://localhost:8018/quote/apply.aspx");
I think my submitForm function is rubbish. How can I improve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现了,我太笨了。答案就在我眼前。
第一个 IF 块没有“THEN”关键字。
不知何故,这通过了语法检查器。
答案是;
Found it, I was being dense. The answer was staring me right in the face.
The first IF block doesn't have the 'THEN' keyword.
Somehow this got past the syntax checker.
The answer is;