what if anybody resigns after visa stamping is done ? will there be any issues after this?

Employer wants to get the h1b visa stamped. but lets say due to any emergency the employee is not able to travel , and he resigns from the company, will there be any issues in it ??

Any kind of legal issues ??

No issues. Employer will most likely withdraw the H-1 petition but will not be able to touch the visa stamp in passport as they would need custody of your passport for that. In future, you can go cap-exempt route even if the petition has been withdrawn.