drno-reg,
если изначально selectedIndex=0
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<form action="http://">
<select name="" id="" onchange=""><option>1</option><option>2</option></select>
<input name="text"><input name="data">
</form>
<script>
function GetValue () {
var result = [];
[].forEach.call(document.querySelector('form').elements, function (el) {
if (['checkbox', 'radio', 'button', 'submit'].indexOf(el.type) === -1 || el.checked)
{
var defValue = el.defaultValue ;
var currvalue = el.value;
var index = el.selectedIndex;
if (index) defValue = el.options[0].value;
if (defValue == currvalue || index === 0) {
result.push(el.name + ' :: ' + el.value+' :: '+" Значение не изменилось");
} else {
result.push(el.name + ' :: ' + el.value+' :: '+" Значение изменилось с " + defValue +
"\n на " + currvalue);
} }
})
alert(result)
}
window.setTimeout(GetValue, 5000)
</script>
</body>
</html>