SyntaxFix
Write A Post
Hire A Developer
Questions
It works for me very nicely:
var x = '/Controller/Action?id=11112&value=4444'; var remove_after= x.indexOf('?'); var result = x.substring(0, remove_after); alert(result);