Sometimes, in pure html website, you may require to send email of the form contents to one ore more people. You can use the following code to first validate the form data entry and then send the contents of the form.

function GetContentWnd()      
{       
    return parent;   
}     


function OnEmail()      
{      
    // do the form validations here   

    var oWnd = GetContentWnd();  
    var subject = "Email Subject";  
    var bodyContent = "Body prefix";   

    // now add the form elements  
    bodyContent += String.fromCharCode(13) + "Form Data: " + 
        document.getElementById('elementId').value +   
        String.fromCharCode(13); 
    // the String.fromCharCode(13) is for giving a line break  

    oWnd.location.href = "mailto:recipientemailaddress?subject="+
        escape(subject)+"&body="+escape(bodyContent);   
}