I am not going to write a long post for this. It can be done by writing two lines of code. Just go to this page . All the information are listed there.
Cheers!
I am not going to write a long post for this. It can be done by writing two lines of code. Just go to this page . All the information are listed there.
Cheers!
When you are working with html form, you might need this below javascript code to implement form reset and cancel features.
<script type="text/javascript">
function clearform(){
if(confirm("Are you sure you want to reset the form?")){
document.res_reg.reset();
}
}
function cancelAction() {
var cancel=confirm("Are you sure you want to cancel?")
if (cancel==true)
{
// Go back (Same result as pressing browser back button)
history.go(-1);
}
else
{
<!-- nothing happens-->
}
}
</script>
<input type="button" value="Reset" onclick="clearform();return false" /> <input type="button" value="Cancel" onclick="cancelAction();" />
Sometime you might need to add a print button on your website. So visitors can print the information from your site easily. To achieve this goal, you need to add below code to your page where you would like the print button to be appeared. Continue reading
[code]// This script sets OSName variable as follows:
// "Windows" for all versions of Windows
// "MacOS" for all versions of Macintosh OS
// "Linux" for all versions of Linux
// "UNIX" for all other UNIX flavors
// "Unknown OS" indicates failure to detect the OS[/code]
[code]var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
document.write('Your OS: '+OSName);[/code]