extract html to JS