由于属性中的非法值而失败:上下文

问题描述 投票:0回答:1
javascript jquery google-apps-script web-applications
1个回答
4
投票

processForm()
方法需要原生
HTMLElement
参数,而不是 jQuery 上下文。

试试这个:

<input type="button" value="Submit"
  onclick="google.script.run
      .withSuccessHandler(updateOutput)
      .processForm($('#form').get(0))" />

参见 jQuery get()

© www.soinside.com 2019 - 2024. All rights reserved.