Код: Выделить всё
input[/b]
function log(event){
document.body.appendChild(document.createElement("div")).textContent=
[event.target.nodeName,event.type].join(" ");
}
form.addEventListener("submit",log);
function propagate(input){
input.dispatchEvent(new Event("submit",{bubbles:true}));
input.parentNode.dispatchEvent(new Event("submit",{bubbles:true}));
}
propagate(input);
Подробнее здесь: https://stackoverflow.com/questions/797 ... nside-form
Мобильная версия