JavaScript replace() Method
Please help me to replace HP with HP="blue" in JavaScript replace() Method
Example
Before => HP
After => HP="blue"
My Source Code
st = st.replace(/HP/,"HP="blue"");
If not have quotation marks it's ok. But I would like to replace with it (HP="blue")
Thanks you very much.
Re: JavaScript replace() Method
You'll first need to study up on just what JavaScript is and what it isn't. For one, it isn't Java, and you're asking this question in a Java forum. I suggest you Google for a JavaScript forum and ask this there. Locking this thread as it has nothing to do with this forum.