[Solved] Split a javascript string between two HTML tags [closed]


You can use code below but you better change the service that returns html result.

var s = "<HTML><head><meta><head><body>YOUR HTML</body></html>"
var body = "<body>";
var bodyEnd = "</body>";
var res = s.substring(s.indexOf(body)+body.length,s.indexOf(bodyEnd));

1

solved Split a javascript string between two HTML tags [closed]