0
I have a variable that contains a string with an HTML code, within that code I have some <input type="text">
. What I need and I couldn’t find a solution, is to change the value
of those inputs
(quantity of inputs varies) within this variable.
I basically wanted to do something like this:
$("input[type=text][name=" + i + "]").val();
the only difference is that I want to do this with the HTML that is inside the variable var html
You selected this html with jquery or it is a string with html code?
– Wictor Chaves
@Wictorchaves is a string that contains HTML, pull this html from the database
– Otavio Souza Rocha
It would be a good idea for you to post a question like the HTML that is in this variable and what may vary in it, because there may be Ids classes or attributes that indicate a more appropriate answer to your case.
– fernandosavio