My requirement is, on a web form if i select some strings, On click of a button i should be able to know if my selected string is in valid HTML syntax or not
function chkhtml() {
var code = $("<table><td>");
code.each(function () {
if($(this).html())
{
alert('success')
}
else
{
alert('fail');
}
})
}
Suppose i write the above code, it should alert me false but it alerts true