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
Release: 2016-06-24 12:18:22
Original
1397 people have browsed it

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>
Copy after login

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)

< div onclick="docment.getElementId('aaa').click();">


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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template