var source = '<img src="not_found.jpg" onerror="alert(1)">';
        var range = document.createRange();
        range.createContextualFragment(source); // onerror が実行される

        var img = document.createElement('img');
        img.setAttribute('onerror', 'alert(2)');
        img.src = 'not_found.jpg'; // onerror が実行される

相关文章:

  • 2021-12-22
  • 2021-05-30
  • 2021-08-02
  • 2021-10-10
  • 2022-02-26
  • 2021-05-19
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2021-12-22
  • 2021-06-07
相关资源
相似解决方案