Even downloaded the images as instructed from there website.
the program is exactly the same as in book(at least that's what i think)
It is suppose to show unhappy face and they should ak for user's name and then dispaly the message and then the happy face
Still when i run it, everything works, but i dont see the rock_happy.png image in the end,.. can anyone help??
I know i am making a silly mistake, just not able to pin point it
I am pasting the program below........
iRock - The Virtual Pet Rock
var username = prompt("May i have your name please", "Enter your name here");
alert("it is good to meet you, " + userName + ".");
document.getElementById("rock_happyImg").src = "C:\Users\JAIPAL\Desktop\rock_happy.png;";
<body onload = "alert('Hi, i am your pet Rock!! :)');">
<div style="margin-top:100px; text-align:center">
<img id="rock_happyImg" src="C:\Users\JAIPAL\Desktop\rock.png" alt="iRock" onclick="touchRock();"/>