0

I have HTML code

 <img src="YP.jpg" width="100%" height="auto" onclick="location.href =&#39;phonepe://pay?pn=Phonepe Pvt Ltd&amp;pa=ktb.xkhemkaryt05322@icici&amp;tn=Order&amp;am=200&#39;;">

And I want to convert specific part of URL by just converting the letters to uppercase in a series.

"ktb.xkhemkaryt05322" This is the part which I want to dynamically change (Just uppercase in a series, like uppercase 1 letter at a time only)

I am not a developer but I am struggling to be one. Anyone kind enough to provide me a solution?

1 Answer 1

1

Dynamic url assaign into this (dynamicUrl) variabel

Example:

var dynamicUrl = "/terget/url"

<img src="YP.jpg" width="100%" height="auto" onclick="location.href =&#39;phonepe://pay?pn=Phonepe Pvt Ltd&amp;pa=${dynamicUrl}">
Sign up to request clarification or add additional context in comments.

2 Comments

So if I use this ${dynamicUrl), i can change this to my custom string with JS?
The target URL you have to assign first in this variable, we assume that the target URL is "https://stackoverflow.com/questions" then you need to assign this URL in a variable, Like var dynamicUrl = "https://stackoverflow.com/questions"

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.