HTS stands for Harmonized Tariff Schedule. It is used worldwide for classifying goods as they are shipped between countries. In the U.S., the HTS if overseen by the ITC (International Trade Commission) at http://www.usitc.gov/. Basic information about tariffs can be found at http://www.usitc.gov/tata/.
A current copy of the Harmonized Tariff Schedule is located at http://www.usitc.gov/tata/hts/bychapter/2005_supp.htm.
HTS codes of end products and individual components are used to determine NAFTA eligibility. Also, as someone on the IPC Lead-free forum recently pointed out, a manufacturer that claims exemption from RoHS under category 8 or 9 of WEEE, but uses an HTS code that definitely does NOT include possibly exempt products, is going to face some very serious questions.
ECCN stands for Export Control Classification Number, which is a number issued by the Bureau of Industry & Security for devices needing an export license. The website for the Bureau of Industry & Security (BIS) is at http://www.bis.doc.gov/.
The Export Administrations Regulations (EAR) database can be found at http://www.access.gpo.gov/bis/ear/ear_data.html.
As far as I know, the EAR codes are only used by the U.S.
HTS codes typically appear in the format xxxx.xx.xxxx, where x can be any number (but not a letter). An example would be 9030.39.3060. A 10-digit number goes down to the lowest level of detail, more broad ranges used 4, 6, or 8 numbers (such as 9030, 9030.39, or 9030.39.30).
ECCN codes can be a combination of letters & numbers, such as EAR99, 3A001 or 3A991.