How to extract javascript coding from a html file?