Get Html Element Attribute Javascript Substring Function Of String