Home >Web Front-end >HTML Tutorial >onclick in div submit form_html/css_WEB-ITnose

onclick in div submit form_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:18:221393browse

I am working on encapsulating extjs with myface.
Myface decodes the form in the background to see if it is the same as the id in the page through the id of the convenience component. If it is the same, the component is triggered
Here is A small function has not been implemented

<form><div onclick="docment.getElementId('aaa').onclick();>提交表单<div><input type="submit" id="aaa" value="sed" style="display:none;"/><input type="submit" id="bbb" value="sddf" style="display:none;"/></form>

There are two submit buttons here, but they are both hidden. Now I click on the div that submits the form, and I want to submit the aaa button
It is equivalent to making changes in onclick to make the browser think that the button ID is aaa is clicked

Why is it so troublesome, because when the background receives data, when the user clicks the button aaa, the background will Get the id of aaa but not the id of button bbb
Please make modifications in the onclick of the div to implement


Reply to the discussion (solution)

2d6a4906c6a2dabe39b4d78834204f7c

230c57df232f8622245cd99cc5248d5d
It was so stupid at the time. I used to work in the backend, but I recently switched to the frontend. Now I realize that my question is so stupid.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn