function disableScript(elem) {
elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
return elem;
}
这句代码看的我完全是一脸懵逼 希望dalao能解答一下
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
因为
<script>的type如果不正确(必须为:
text/javascript、text/jscript、text/vbscript,或者无type),将不会当成js执行
<style type="text/css">同理将dom对象的type属性设置为普通type属性,并用/分割