what i need is, if someone hits ok on a javascript input box, then their inputed text comes out normal. but if they hit cancel, their inputed text should come out blue.

heres my code:

<script type="text/javascript">
function firstName() {
var name = prompt ("Please Enter Your Name");
alert('Some Text');
document.getElementById("1").innerHTML = name;
document.getElementById("2").innerHTML = name;
document.getElementById("3").innerHTML = name;
document.getElementById("4").innerHTML = name;
document.getElementById("5").innerHTML = name;
document.getElementById("6").innerHTML = name;
document.getElementById("7").innerHTML = name;
document.getElementById("8").innerHTML = name;
document.getElementById("9").innerHTML = name;
document.getElementById("10").innerHTML = name;
document.getElementById("11").innerHTML = name;
im sure id use and if else statement but im not entirely sure how this can be done. any help would be appreciated, thanks.