2

我目前正在创建一个 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 功能是垃圾。我该如何改进它?

4

1 回答 1

2

找到了,我是密密麻麻的。答案正盯着我的脸。

第一个 IF 块没有“THEN”关键字。

不知何故,这通过了语法检查器。

答案是;

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");
于 2010-01-14T16:30:01.413 回答