0

Acrobat 9 で JavaScript を使用して、アメリカ史の学生向けのテストを作成しています。彼らが彼らに対して答えなかった答えを数えたくありません。これが私がこれまでに持っているものです:

var arrTest = "cell.1", "cell.2", "cell.3" , "cell.4"); //Will have more than four
count = 0, i = arrTest.length;  while (i--) {
    if (typeof arrTest[i] === "undefined")
    count++;
}

ところで、良い学習教材はありますか?

4

1 に答える 1

0

Acrobat で回答にアクセスする方法はわかりませんが、JavaScript が少し間違っています。

var arrTest = [ "cell.1", "cell.2", "cell.3" , "cell.4"],
    count = 0,
    i = arrTest.length;

while (i--) {
    //Assume PDFdoc is a var referencing your Acrobat document - not sure how it works there.
    if (typeof PDFdoc.getField(arrTest[i]).value === "undefined") {
        count++;
    }
}
于 2012-04-20T20:55:58.383 に答える