The title seems easy, but I need help.
I have a form with a field input \"email\" of which value is null until the user fills it up. Okay, on click of the submit button,
It's good that you were trying to use setAttribute at all because it's an important method, but the problem is that you don't want to modify the value attribute in this case, which is a part of the DOM, but you want to modify the element's value property.
email.value = 'Insert a correct email';
http://jsfiddle.net/XJZwm/