Atrybuty i właściwości - synchronizacja

document.body.setAttribute('id','x');
alert(document.body.id); //na id to działa

a.href = 'index.html';
alert(a.getAttribute('href'));
alert(a.href); //na href to też działa

input.setAttribute('value', 'new');
alert( input.value ); // na value działa w tę stronę

input.value = 'new';
alert(input.getAttribute('value')); //a w tę stronę już nie