jquery remove img tag

var htmlContent = '<img class = "emoji" style = "vertical-align: middle" src = "/ static / wap / img / emoji / 1f601.png"> Original title:! [solution Bureau] "kingdom Commission to take this year several off Taiwan 'allies'? "" ha ha ha ha "[knight Island by] two sessions every year, Chinese Foreign Minister's press conference is always one of the highlights. Today, 10:00, State Councilor and Minister of Foreign Affairs Wang Yi, on "China's foreign policy and foreign relations," Chinese and foreign reporters to answer questions. This is the first press conference after last year's NPC and CPPCC Foreign Minister Wang Yi was promoted to State Councilor. Wang remains of his scholarly demeanor, face various problems thrown over the presence of reporters, peaceful Ye Hao, Ye Hao sharp, one by one react. Wang Yi, staring at the lens inside and outside the media do every move topic, Lianhui fist, smiles have become news, public opinion can also be found on Wang's favorite. In fact, the press conference best-looking than Wang's response to sensitive hot topics, how to answer, it is displayed effort. Knight Island intercepted some wonderful question and answer segment, with the view. ';
   Var = htmlContent.replace Data (<. * IMG>. / * <\ / IMG> / IG, ""); // filter as <img> </ img> element in the form of image
   data = data.replace ( /<img.*\/>/ig, ""); // filter as <img /> element in the form of
   alert (data);

Guess you like

Origin blog.csdn.net/qq_42310995/article/details/88594736