当设备是阿拉伯语时,输入字段显示阿拉伯语为type =" number"

时间:2016-01-03 11:49:06

标签: html css mobile dojo translation

我们正在使用DOJO 1.10.3开发混合移动应用程序

我有一个输入字段,其类型编号字段已预先填充,并且我将新的罗马字体应用于输入字段。当设备语言设置为阿拉伯语时,预先填充的输入字段显示阿拉伯数字,但我只想显示英文数字。

我正在尝试编辑的预先填充的输入字段,它显示的是英文数字。

不希望它将其翻译为阿拉伯数字。我该怎么做?

problem screen shot



var jsonFiled={'firstField':"1kjj678",'secondField':58815}
	document.getElementById('1stField').value=jsonFiled.firstField;
	document.getElementById('2ndField').value=jsonFiled.secondField;

@font-face {
	font-family: Times New Roman;
	src: url(font-face/Times_New_Roman_Normal.ttf);
}

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

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

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

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

button {
	font-weight: bold;
	margin: 18px auto 0px auto;
	display: block;
	width: 85.5%;
	border: 1px solid rgb(204, 204, 204);
	height: 35px;
	font-size: 14px;
	line-height: 2.4;
	border-radius: 7px;
	-webkit-text-fill-color: rgba(160, 32, 64, 1.0);
	background: #fceabb;
	background: -moz-linear-gradient(top, #fceabb 0%, #fccd4d 50%, #f8b500 51%, #fbdf93
		100%); /* FF3.6-15 */
	background: -webkit-linear-gradient(top, #fceabb 0%, #fccd4d 50%, #f8b500 51%,
		#fbdf93 100%); /* Chrome10-25,Safari5.1-6 */
	background: linear-gradient(to bottom, #fceabb 0%, #fccd4d 50%, #f8b500 51%, #fbdf93
		100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fceabb',
		endColorstr='#fbdf93', GradientType=0); /* IE6-9 */
	font-family: Times New Roman !important;
		
} 

<!DOCTYPE HTML>
<html>
    	<head>
    		<meta charset="UTF-8" /> 
    		
    		<title>errwer</title>
<meta name="viewport"
	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">
<!--
    			<link rel="shortcut icon" href="images/favicon.png">
    			<link rel="apple-touch-icon" href="images/apple-touch-icon.png"> 
    		-->
    		
   
    		<link rel="stylesheet" href="css/main.css">
    		<script>window.$ = window.jQuery = WLJQ;</script>
    		<script type="text/javascript" src="dojox/mobile/deviceTheme.js"></script>
    		<script type="text/javascript" data-dojo-config="isDebug: false, async: true, parseOnLoad: true, mblHideAddressBar: false" src="dojo/dojo.js"></script>
    	</head>
    	<body style="display: none;" lang="en">

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

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

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

1 个答案:

答案 0 :(得分:0)

这有用吗?在lang元素

设置属性body
<body lang="en">