G
G
Good Samaritan2017-09-21 16:14:09
PHP
Good Samaritan, 2017-09-21 16:14:09

How to remove unnecessary code from returned ajax html?

For example, it returns an html code in which there is an input, but I don’t need it, how can I remove the input from this code?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
O
one_day, 2017-09-21
@one_day

str_replace

A
Alexey Emelyanov, 2017-09-21
@babarun

Insert the resulting html into a temporary hidden div, carry out all the manipulations you need with it, and then transfer the resulting dom to the place you need and finally delete the temporary div

Y
Yura Komarov, 2017-09-21
@Yurajun

strreplace = function (search, replace, str){
return str.split(search).join(replace);
};

I
IJIL, 2017-09-22
@IJIL

jquery $(input).remove()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question