+ 1
how do i alert a form on my website
i want to alert a form when a button is pressed.
1 ответ
+ 2
This may not cover everything fully (some elements use different attributes), but it's a start.
<form onclick=iterate(this)>
<input type="text" value="something"></input>
<input type="radio" checked>Click the form somewhere</input>
</form>
<script>
function iterate(el) {
for(i in el.children) {
var test = el.children[i].value;
if(test !== undefined) alert(test);
}
}
</script>