Conversion html a javascript