how to create a chat box in html code example
Example 1: how to create comments in html5
Insert a single-line, or multi-line comment.
Comments are designated by the tags <! -- and -->
Use the comment function to hide scripts on unsupported browsers
. If you are programming in JavaScript or VBScript,
you can use the comment function to hide the script on browsers
that don't support it. Insert the comment at the start of the
script, and end it with
on browsers that do support it.
Example 2: search functionality for html table on text box
BY LOVE SINGH,
Call this function onKeyUp event of TEXTBOX.
function myFunction() {
var input, filter, table, tr, td, i;
input = document.getElementById("TextBoxID");
filter = input.value.toUpperCase();
table = document.getElementById("TableID");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[1];
var x = $("#TextBoxID").val();
var regex = /^[a-zA-Z]+$/;
if (!x.match(regex)) {
td = tr[i].getElementsByTagName("td")[0];
}
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}