通过单击gwt按钮来创建一个表单。

时间:2022-11-02 20:57:13

I am trying to make the browser's password manager remember the input from the ajax form generated with gwt.

我试图让浏览器的密码管理器记住使用gwt生成的ajax表单的输入。

My idea is to use a hidden standard static html form on the page, and let the browser use that one. However, now I have to make the form submit the data upon clicking my custom gwt login button.

我的想法是在页面上使用一个隐藏的标准静态html表单,让浏览器使用这个表单。但是,现在我必须让表单在单击我的自定义gwt登录按钮时提交数据。

I can get the form element using the getElementById() or similar methods, but can I somehow submit that form so the browser asks to save the user data?

我可以使用getElementById()或类似的方法获取表单元素,但我可以以某种方式提交表单,以便浏览器请求保存用户数据吗?

2 个解决方案

#1


1  

jQuery can:

jQuery可以:

$("#formID").submit()

Upd. Raw JavaScript:

乌利希期刊指南。生JavaScript:

document.forms["formID"].submit();

#2


2  

I think FormPanel is what you are looking for.

我想FormPanel是你要找的。

#1


1  

jQuery can:

jQuery可以:

$("#formID").submit()

Upd. Raw JavaScript:

乌利希期刊指南。生JavaScript:

document.forms["formID"].submit();

#2


2  

I think FormPanel is what you are looking for.

我想FormPanel是你要找的。