Javascript 如何防止在“英特尔XDK”中输入文本时打开键盘?

Javascript 如何防止在“英特尔XDK”中输入文本时打开键盘?,javascript,jquery-mobile,intel-xdk,Javascript,Jquery Mobile,Intel Xdk,嗨,朋友们,我是新加入英特尔XDK 我的代码:- <html> <head> <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.c

嗨,朋友们,我是新加入
英特尔XDK

我的代码:-

<html>
<head>

    <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css">
    <script src="//code.jquery.com/jquery-1.9.1.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"></script>

<script>

   $(function() {
      $( "#txt_date" ).datepicker({
      changeMonth: true,
      changeYear: true
     });
    });
</script>
</head>
<body>

    <input type="text" name="text-date" id="txt_date" value="" readonly="true" >

</body>
</html>

$(函数(){
$(“#txt_日期”).datepicker({
变化月:对,
变化年:对
});
});
我也尝试了输入文本的只读属性,但我无法解决我的问题

问题:

这里我的问题是,当我点击输入文本时,我会得到很好的
Jquery日期选择器
。但是使用
Datepicker
我的移动设备上也会出现
键盘
。因此,如果有人能解决这个问题,请帮助我


提前谢谢

我想你应该走这条路:

$(function() {
         $("#txt_date").keypress(function(event) {
                event.preventDefault();
         });

    $( "#txt_date" ).datepicker({
      changeMonth: true,
      changeYear: true
    });
  });