When I attempt to run the following code, I keep getting the error:
Cannot set property "value" of null at "id"
I've tried to change the property from value
to innerHTML
but that didn't work. I would be grateful if you would be able to help me. Thank you!
<div class="input-field s6 col" style="color: white; background-color:transparent;">
<input id="avatar_url" id="ipoza" type="text" onfocus="style='background-color:white;'" onblur="style='background-color:transparent'" value="http://i01.c.aliimg.com/img/ibank/2014/101/288/1614882101_2028072840.jpg"> <label for="avatar_url"><p>Poza de Profil</p></label>
</div>
<button onclick="i()"></button>
<script type="text/javascript">
function i() {
document.getElementById("ipoza").value = "Link";
}
</script>