Convert HTML code to JS