我通過 new XMLHttpRequest() 進行 ajax 調(diào)用;當我這樣做時var params = "x="+encodeURIComponent(x);var xhr = new XMLHttpRequest(); xhr.open("POST", "....php", true);xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");xhr.onreadystatechange = function(e) { if (xhr.readyState == 4) { $("#divID").html(e.currentTarget.responseText); }}xhr.send(params);它很好并且運行良好.....但是當結(jié)果包含@時我在控制臺日志中收到此錯誤Uncaught TypeError: Cannot read property 'removeChild' of null without using removeChild澄清:例如:當 php 給出<img src="..." />-->> 沒關(guān)系當 php 給出some text blablabla ...blalbla contact allo@test.com-->> 我得到錯誤為什么我需要修復(fù)它???
ajax xhr.responseText 當結(jié)果包含@error uncaught
慕尼黑5688855
2022-12-09 13:46:41