//Paste the code into script tagfunction documentClick(){ alert("You clicked in the document");}function paragraphClick(value){ alert("You clicked the text"); if(value) event.cancelBubble=true;}document.onclick=documentClick;// Paste the code into paragraph tagonclick="paragraphClick(false)"//Paste the code into another paragraph tagonclick="paragraphClick(true)"