Saved X
Google login
SignUp with Email
X

Js remove after character

theindreshverma ( Added  Sep 30, 03:04 pm )
Login

Javascript substring() method with indexof()

<script>
var str = '/snippets/data?url=BkNlG&type=add';
str = str.substring(0, str.indexOf('?'));
document.write(str);

// str.substring(start, end)
</script>

Sourcecode Tags

More Sourcecodes

More Sourcecodes