2014-01-30 71 views
1

嗨朋友我是新的intel XDK如何防止在intel 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> 

我試過也只讀輸入文本的屬性,但我不解決我的問題。

問題:

這裏我的問題是,當我點擊輸入文本,然後我得到精細Jquery Datepicker但隨着Datepicker我也得到Keyboard我的手機device.So如果有人有這個問題的解決方案,以便請幫幫我。

在此先感謝!

回答

0

我想你應該走這條路:

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

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

謝謝哥們這是工作.. –

+0

快樂與英特爾XDK新編碼... !!!! –