try this
function fnSaveData() {
var customer = document.getElementById('<%= txtCustomer.ClientID %>').value;
alert (customer);
window.localStorage.setItem("CustName",customer );
var id = document.getElementById('id').value;
alert(id);
window.localStorage.setItem("CustAddr", id);
}