There may be some functions available in Javascript to deal with the COM ports. But you may need to take care of plenty of things such as fireawall exception, Javascript enabled web browser, etc.
These things are very easy to do in windows application. But never tried in web applications because such things are seldom needed or not needed for any websites.