Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Modernizer no js类不起作用_Javascript_Html_Modernizr - Fatal编程技术网

Javascript Modernizer no js类不起作用

Javascript Modernizer no js类不起作用,javascript,html,modernizr,Javascript,Html,Modernizr,这是我在stackoverflow的第一次体验,也是我的第一个问题。 最近我从旧的SkoolHTML转到HTML5,所以经过一些研究,我了解了Modernizer 我这样抬起头: 我在wordpress论坛上回答了你的问题,但这里是相同的答案 Modernizer是客户端javascript,因此它在源代码加载到浏览器后运行。它实际上并不修改源代码,而是修改DOM 如果在浏览器中打开开发人员工具,您将看到html类被删除 希望有帮助 您如何查看源代码?源代码实际上是从服务器加载的。要在应用动态

这是我在stackoverflow的第一次体验,也是我的第一个问题。 最近我从旧的SkoolHTML转到HTML5,所以经过一些研究,我了解了Modernizer

我这样抬起头:



我在wordpress论坛上回答了你的问题,但这里是相同的答案

Modernizer是客户端javascript,因此它在源代码加载到浏览器后运行。它实际上并不修改源代码,而是修改DOM

如果在浏览器中打开开发人员工具,您将看到html类被删除


希望有帮助

您如何查看源代码?源代码实际上是从服务器加载的。要在应用动态更改后查看DOM,您可以使用web浏览器的开发人员工具(例如,在Firefox中:工具->web开发人员->检查器),或者在Firefox中,选择全部(
Ctrl+A
),然后在页面视图区域的上下文菜单中选择“查看选择源”项。
<!DOCTYPE html>

<!--[if IE 6]>
<html class="no-js" id="ie ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html class="no-js" id="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html  class="no-js"id="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!-->
<html class="no-js" <?php language_attributes(); ?>>
<!--<![endif]-->

<head>

<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/> 

<script src="<?php bloginfo('template_directory'); ?>/js/modernizr.custom.65696.js"></script>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.0.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>

</head>