简体   繁体   English

使用者范围滑杆无法正常运作

[英]Ui range slider is not working properly

I don't know what's wrong. 我不知道怎么了 This code is correct but when I run it in my local machine I recognize that the input field is missing! 这段代码是正确的,但是当我在本地计算机上运行它时,我发现输入字段丢失了!
在此处输入图片说明

 <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>slider demo</title> <link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> <script src="//code.jquery.com/jquery-1.10.2.min.js"></script> <script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> </head> <body> <div data-role="header"> <h1>jQuery Mobile Example</h1> </div> <div role="main" class="ui-content"> <label for="slider-0">Input slider:</label> <input type="range" name="slider-0" id="slider-0" value="60" min="0" max="100"> </div> </body> </html> 

You need to set protocol because by default browser will set file:// 您需要设置协议,因为默认情况下浏览器会设置file://

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
  <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
  <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>

IMPORTANT - it is a bad practise to specify the protocol, use this only on local machine 重要提示-指定协议是一种不好的做法,只能在本地计算机上使用

 <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>slider demo</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> </head> <body> <div data-role="header"> <h1>jQuery Mobile Example</h1> </div> <div role="main" class="ui-content"> <label for="slider-0">Input slider:</label> <input type="range" name="slider-0" id="slider-0" value="60" min="0" max="100"> </div> </body> </html> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM