2017-03-05 42 views
-1

我是新手引导,当我复制粘贴从引导站点的基本代码,并运行它完美运行并显示“你好,世界”,但是当我做了一个最小改变像的 “Hello World” 到 “世界”,它仍然显示的 “hello world” 以下是代码Bootstrap:更改为基本代码未在网络浏览器上显示

<!DOCTYPE html> 
 
    <html lang = "en"> 
 
     
 
     <head> 
 
      <meta charset = "utf-8"> 
 
      <meta http-equiv = "X-UA-Compatible" content = "IE = edge"> 
 
      <meta name = "viewport" content = "width = device-width, initial-scale = 1"> 
 
      
 
      <title>Bootstrap 101 Template</title> 
 
      
 
      <!-- Bootstrap --> 
 
      <link href = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel = "stylesheet"> 
 
      
 
      <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 
 
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> 
 
      
 
      <!--[if lt IE 9]> 
 
      <script src = "https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> 
 
      <script src = "https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 
 
      <![endif]--> 
 
      
 
     </head> 
 
     
 
     <body> 
 
      <h1>Hello, world!</h1> 
 
      
 
      <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
 
      <script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
 
      
 
      <!-- Include all compiled plugins (below), or include individual files as needed --> 
 
      <script src = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> 
 
      
 
     </body> 
 
    </html>

+0

如果它的字符串没有改变,那么页面必须被缓存按ctrl + f5清除缓存 –

+0

不工作@GhanshyamSingh – SFAH

回答

1

没有发现问题..完美的工作..

印刷他LLO。世界

<!DOCTYPE html> 
 
    <html lang = "en"> 
 
     
 
     <head> 
 
      <meta charset = "utf-8"> 
 
      <meta http-equiv = "X-UA-Compatible" content = "IE = edge"> 
 
      <meta name = "viewport" content = "width = device-width, initial-scale = 1"> 
 
      
 
      <title>Bootstrap 101 Template</title> 
 
      
 
      <!-- Bootstrap --> 
 
      <link href = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel = "stylesheet"> 
 
      
 
      <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 
 
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> 
 
      
 
      <!--[if lt IE 9]> 
 
      <script src = "https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> 
 
      <script src = "https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 
 
      <![endif]--> 
 
      
 
     </head> 
 
     
 
     <body> 
 
      <h1>Hello, world!</h1> 
 
      
 
      <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
 
      <script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
 
      
 
      <!-- Include all compiled plugins (below), or include individual files as needed --> 
 
      <script src = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> 
 
      
 
     </body> 
 
    </html>

印刷世界

<!DOCTYPE html> 
 
    <html lang = "en"> 
 
     
 
     <head> 
 
      <meta charset = "utf-8"> 
 
      <meta http-equiv = "X-UA-Compatible" content = "IE = edge"> 
 
      <meta name = "viewport" content = "width = device-width, initial-scale = 1"> 
 
      
 
      <title>Bootstrap 101 Template</title> 
 
      
 
      <!-- Bootstrap --> 
 
      <link href = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel = "stylesheet"> 
 
      
 
      <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 
 
      <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> 
 
      
 
      <!--[if lt IE 9]> 
 
      <script src = "https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> 
 
      <script src = "https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 
 
      <![endif]--> 
 
      
 
     </head> 
 
     
 
     <body> 
 
      <h1>world!</h1> 
 
      
 
      <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
 
      <script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 
 
      
 
      <!-- Include all compiled plugins (below), or include individual files as needed --> 
 
      <script src = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> 
 
      
 
     </body> 
 
    </html>

你不保存文件正确。 当您尝试仅打印world..try时更改文件的名称并运行它。

另一件事是你的浏览器缓存文件清除缓存。

你在代码中没有问题。

+0

当我用其他名字保存文件并运行它时,它运行完美,但这里是我的问题,为什么发生这种情况?当我想改变任何东西,所以我应该用其他名字保存文件? :| – SFAH

+0

因为您的浏览器正在缓存文件的旧名称,并从缓存中加载它...清除浏览器的缓存...尝试从其他浏览器运行它,你会发现它会完美的工作。 – neophyte

+0

在head标签中使用'..你的浏览器将停止缓存尝试。 – neophyte

相关问题