2016-01-03 74 views
0

我們使用DOJO 1.10.3當設備是阿拉伯語然後輸入字段是表示阿拉伯語用於type =「數字」

我有類型號碼的輸入字段字段prepulated和我施加顯影混合移動應用英文乘以新的羅馬字體到輸入字段。當設備語言設置爲阿拉伯語時,預先填充的輸入字段顯示阿拉伯數字,但我只想顯示英文數字。

prepopulated inputfields我試圖編輯在那段時間它顯示英文數字。

不希望它把它翻譯成阿拉伯數字。我怎樣才能做到這一點?

problem screen shot

var jsonFiled={'firstField':"1kjj678",'secondField':58815} 
 
\t document.getElementById('1stField').value=jsonFiled.firstField; 
 
\t document.getElementById('2ndField').value=jsonFiled.secondField;
@font-face { 
 
\t font-family: Times New Roman; 
 
\t src: url(font-face/Times_New_Roman_Normal.ttf); 
 
} 
 

 
.ui-page { 
 
\t font-family: Times New Roman !important; 
 
    } 
 

 
.ui-header{ 
 
\t height: 42px!important; 
 
\t border-top: 2px solid rgba(106, 106, 106, 1.0); 
 
\t border-bottom: 2px solid rgba(106, 106, 106, 1.0); 
 
\t display: table; 
 
\t vertical-align: top !important; 
 
\t top: 0px !important; 
 
\t width: 100%; 
 
\t top: 0px !important; 
 
\t right:0px; 
 
\t left:0px; 
 
\t text-align: center; 
 
\t z-index: 1000; 
 
\t position: fixed !important; 
 
\t background: rgba(160, 32, 64, 1.0); 
 
\t font-family: Times New Roman !important; 
 
} 
 
    
 
.ui-content { 
 
\t border: none !important; 
 
\t margin: 0px !important; 
 
\t position: absolute !important; 
 
\t bottom:0px !important; 
 
\t left: 0px !important; 
 
\t right:0px !important ; 
 
\t top:20px !important; 
 
\t padding:0px 15px 0px 15px !important; 
 
\t font-family: Times New Roman !important; 
 
} 
 

 
.ui-footer{ 
 
\t background: rgba(160, 32, 64, 1.0); 
 
\t height: 44px; 
 
\t border-top: 2px solid rgba(106, 106, 106, 1.0); 
 
\t border-bottom: 2px solid rgba(106, 106, 106, 1.0); 
 
\t vertical-align: bottom !important; 
 
\t bottom: 0px !important; 
 
\t width: 100%; 
 
\t position: fixed; 
 
\t font-family: Times New Roman !important; 
 
} 
 

 
input { 
 
\t margin: 0px auto 0px auto; 
 
\t font-size: 12px; 
 
\t font-weight: bold; 
 
\t text-indent: 10px; 
 
\t color: rgba(23, 82, 117, 1.0); 
 
\t display: block; 
 
\t width: 85%; 
 
\t height: 34px; 
 
\t border: 1px solid rgba(204, 204, 204, 1.0); 
 
\t border-radius: 0px; 
 
\t background-color: white !important; 
 
\t outline: none !important; 
 
\t font-family: Times New Roman !important; 
 
} 
 

 
button { 
 
\t font-weight: bold; 
 
\t margin: 18px auto 0px auto; 
 
\t display: block; 
 
\t width: 85.5%; 
 
\t border: 1px solid rgb(204, 204, 204); 
 
\t height: 35px; 
 
\t font-size: 14px; 
 
\t line-height: 2.4; 
 
\t border-radius: 7px; 
 
\t -webkit-text-fill-color: rgba(160, 32, 64, 1.0); 
 
\t background: #fceabb; 
 
\t background: -moz-linear-gradient(top, #fceabb 0%, #fccd4d 50%, #f8b500 51%, #fbdf93 
 
\t \t 100%); /* FF3.6-15 */ 
 
\t background: -webkit-linear-gradient(top, #fceabb 0%, #fccd4d 50%, #f8b500 51%, 
 
\t \t #fbdf93 100%); /* Chrome10-25,Safari5.1-6 */ 
 
\t background: linear-gradient(to bottom, #fceabb 0%, #fccd4d 50%, #f8b500 51%, #fbdf93 
 
\t \t 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ 
 
\t filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceabb', 
 
\t \t endColorstr='#fbdf93', GradientType=0); /* IE6-9 */ 
 
\t font-family: Times New Roman !important; 
 
\t \t 
 
}
<!DOCTYPE HTML> 
 
<html> 
 
    \t <head> 
 
    \t \t <meta charset="UTF-8" /> 
 
    \t \t 
 
    \t \t <title>errwer</title> 
 
<meta name="viewport" 
 
\t content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no,target-densityDpi=device-dp"> 
 
<meta name="apple-mobile-web-app-capable" content="yes"> 
 
<!-- 
 
    \t \t \t <link rel="shortcut icon" href="images/favicon.png"> 
 
    \t \t \t <link rel="apple-touch-icon" href="images/apple-touch-icon.png"> 
 
    \t \t --> 
 
    \t \t 
 
    
 
    \t \t <link rel="stylesheet" href="css/main.css"> 
 
    \t \t <script>window.$ = window.jQuery = WLJQ;</script> 
 
    \t \t <script type="text/javascript" src="dojox/mobile/deviceTheme.js"></script> 
 
    \t \t <script type="text/javascript" data-dojo-config="isDebug: false, async: true, parseOnLoad: true, mblHideAddressBar: false" src="dojo/dojo.js"></script> 
 
    \t </head> 
 
    \t <body style="display: none;" lang="en"> 
 

 
<div data-dojo-type="dojox.mobile.View" id="view1" 
 
\t \t data-dojo-props="selected:false" class="ui-page"> 
 
\t <div data-dojo-type="dojox.mobile.ScrollableView" id="view0" data-dojo-props="selected:true"> 
 

 
\t \t <div class="ui-header" data-dojo-type="dojox.mobile.Heading" 
 
\t \t \t \t data-dojo-props="label:'Header',fixed: 'top'" data-position="fixed" data-tap-toggle="false" data-hide-during-focus="false"> 
 
\t \t </div> 
 
\t \t \t <div class="ui-content" data-dojo-type="dojox.mobile.Container"> 
 
\t \t \t  
 
\t \t \t  
 
\t \t \t  <input data-dojo-type="dojox.mobile.TextBox" id="1stField" style="font-family:Times New Roman!important;"> 
 
\t \t \t \t 
 
\t \t \t \t <input data-dojo-type="dojox.mobile.TextBox" id="2ndField" type="number" style="font-family:Times New Roman!important;"> 
 
\t \t \t \t \t \t 
 

 
\t \t \t  <button data-dojo-type="dojox.mobile.Button">SUBMIT</button> 
 
\t \t \t </div> 
 
\t \t \t  
 
\t \t \t <div data-dojo-type="dojox.mobile.Heading" class="ui-footer" 
 
\t \t \t \t \t data-dojo-props="label:'Footer',fixed: 'bottom'"></div> 
 
\t \t \t \t \t 
 
\t \t </div> 
 
    </div> \t 
 
    \t \t 
 
    \t \t 
 
    \t \t 
 
    \t \t <script src="js/initOptions.js"></script> 
 
    \t \t <script src="js/main.js"></script> 
 
    \t \t <script src="js/messages.js"></script> 
 
    \t </body> 
 
</html>

+0

嘗試添加'模式=「[0-9] {10}」'到輸入端,改變10,如果你想要更多的數字 – Billy

+0

我嘗試也沒有,但工作 –

+0

什麼關於在表單標籤上放置'accept-charset =「ISO-8859-1」'? – Billy

回答

0

是這項工作?集屬性langbody元素

<body lang="en">