Sửa Lỗi Không Lưu Được Mã Quảng Cáo Adsense Trong Blogger
Xuất bản - tháng 9 14, 2017
Attribute name "async" associated with an element type "script" must be followed by the ' = ' character
Để sửa lỗi trên bạn chỉ cần thêm dòng như sau vào code:
async="async"
Ví dụ cụ thể, code Google Adsense đang như thế này:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- MLTC foot post 336v280 -->
<ins class="adsbygoogle" data-ad-client="ca-pub-712987019925812345" data-ad-slot="6386538945" style="display: inline-block; height: 280px; width: 336px;"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Bạn phải sửa lại thành như thế này thì khi chèn vào mới không bị lỗi:
<script async="async"src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- MLTC foot post 336v280 -->
<ins class="adsbygoogle" data-ad-client="ca-pub-712987019925812345" data-ad-slot="6386538945" style="display: inline-block; height: 280px; width: 336px;"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Chúc Các Bạn Sửa Thành Công !
NGUỒN: SHOP THỦ THUẬT!
Viết bình luận (0)
Xếp theo