Reply given in the above comment is not considering below html tags.
<html>,<body> and <head>
So this is how i implemented the requirement and it is working fine.
var textboxValue = document.getElementById("textbox").value;
var nonHtmlValue = textboxValue.replace(/<[^>]+>/g, '');
if(textboxValue!=nonHtmlValue)
{
alert("HTML is not allowed");
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…