AutoSaving doctype contents without shorcut key or clicking on Save Button

I want to save my data in a doctype without clicking o save button or shortcut key(ctrl+s). Any way to do so with the help of custom script or any trigger ?

What is your use case? Try in js