nasekt Posted October 17, 2014 Share Posted October 17, 2014 How do I replace the string "rpg" only present in between <et> tags ? <et>ReplaceOnlyrpg</et> After replacement it should look like this <et>ReplaceOnly</et> Thank you Link to comment Share on other sites More sharing options...
justsomeguy Posted October 17, 2014 Share Posted October 17, 2014 You can use document.getElementsByTagName to get all elements of a specific tag, and loop through them and use the innerHTML property to replace the content. The String.replace function will do that.https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace Link to comment Share on other sites More sharing options...
nasekt Posted October 18, 2014 Author Share Posted October 18, 2014 Thanks, is there any other way without using DOM to get the string? I am using Fiddler http://www.telerik.com/fiddler which runs on JScript.NET, It's a Man in the middle proxy. Some samples of what it can do, http://fiddlerbook.com/fiddler/Dev/ScriptSamples.asp Link to comment Share on other sites More sharing options...
justsomeguy Posted October 20, 2014 Share Posted October 20, 2014 I'm not familiar with what you're allowed to do in Fiddler, if you're working in a browser then the entire page is in the DOM and that's how you access everything. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now