i write smart extension for chrome and I inject my javascript inside all frame in frameset page...
In one of frame I want to replace onsumbit for form. I want to analyze (x, y) values for image type field before make submit.
I can find element by name开发者_运维知识库 to get form. I can get onsubmit property. But how to make check sending values before submit?
Thanks.
Hm, something like this?
var formEl = document.getElementById("form1");
var originalOnSubmit = formEl.onsubmit;
formEl.onsubmit = function() {
if(all_ok) {
originalOnSubmit();
} else {
return false;
}
}
精彩评论