<button type="button" onclick="javascript:window.close()"> Name </button>
//<button onclick="(type your code here)"> window.close();