The Prompt Example

var name = prompt("Please write your \'name\' in the box\r
Write it with \"quotes\" like this.","");

(this should be all on one line)


The Alert Example

Now here's the code. This should all be written on one long line. It's probably trancating on your screen though. Just make a point of going through it piece by piece and you'll see each of the escape characters at work.

alert('OK Then!\r\rYou want a neat box like \"this\" one?\r\rWell!\r\rYou\'ll need:\rBrains\tBeauty\t\tTalent\rMoney\tDog food\t\tLuck\rA Cat\tEye of Newt\tA Shrubbery!\r\rAnd the ability to \'read\' this tutorial.\r\rOK?')

Back to the index page...