我在开发一个阿拉伯语网站时遇到一个问题,该网站在表单字段中只出现阿拉伯数字(٠、١、٢、٣…)。我想让用户输入欧洲数字(0、1、2、3……),但我无法让它工作:
有什么办法可以解决这个问题吗?我怎样才能让用户输入欧洲数字?
* {
padding: 0;
margin: 0;
box-sizing: border-box;
outline: none;
border: none;
font-family:'customfont';
background-size: 120px 80px;
/*font-family: Kufyan-Arabic-Black;
src: url('font/KufyanArabic-Black.ttf');*/
}
/* font */
@font-face {
font-family:'customfont' ;
src: url(font/GE_SS_Unique_Light.otf);
}
body{
background-image: url(image/duck.png);
background-repeat: no-repeat;
background-size: cover;
background-color: #FEFAF1 ;
width: 100%;
height: 100vh;
background-position: fixed; /*center*/
position: relative;
direction: rtl;
}
.container{
width:88%;
margin: 0 auto;
border-width: 10px;
}
.button {
cursor: pointer;
border: 0;
border-radius: 40px;
font-weight: 500;
font-size: large;
margin: 0 0px;
width: 150px;
padding: 10px 0;
box-shadow: 1px 1px 10px#CCECBD;
transition: 0.4s;
color: black;
background-color: #CCECBD;
}
.button:hover {
box-shadow:lightblue;
}
.con {
background: #F1F2F0;
border-radius: 5px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
width: 400px;
padding: 30px 40px;
position: absolute; /*fixed*/
top: 53%;
left: 53%;
transform: translate(-50%,-50%);
max-width: 500px;
width: 100%;
padding: 25px;
border-radius: 9px;
box-shadow: 4px 4px 2px #F1F2F0(230, 254, 164);
}
.con h1 {
text-align: center;
margin: 0 0 20px;
font-size: 24px;
}
.input {
margin-bottom: 20px;
position: relative;
}
.input label {
display: block;
margin-bottom: 10px;
}
.input input {
width: 100%;
height: 40px;
padding: 0 15px;
background-color: white;
border: 1px solid #e0e0e0;
border-radius: 5px;
}
.input small {
position: absolute;
top: 42px;
right:120px;
display: block;
color: #e74c3c;
font-weight: bold;
font-size: 11px;
padding-top: 3px;
visibility: hidden;
}
.input.success input {
border: 2px solid #2ecc71;
}
.input.error input {
border: 2px solid #e74c3c;
}
.input.error small {
visibility: visible;
}
button {
border: 0px;
margin-top: 15px;
padding: 10px 0;
text-align: center;
width: 40%;
color: black;
text-transform: uppercase;
font-weight: bold;
font-size: 18px;
border-radius: 25px;
cursor: pointer;
align-items: center;
margin-right:140px;
background: #C5E8B4;
opacity: 0.9;
box-shadow: inset 0px 0px 12px rgba(73, 83, 64, 0.25);
}
<body dir="rtl">
<div>
<div class="con">
<h1> إنشاء حساب</h1>
<form action="" id="form" class="form">
<div class="input" style="display:flex; flex-direction: row; justify-content: center; align-items: center">
<label for="P_FirstName">الاسم الاول</label>
<input
type="text"
name="P_FirstName"
id="P_FirstName"
autocomplete="off"
/>
<small>Error message</small>
</div>
<div class="input" style="display:flex; flex-direction: row; justify-content: center; align-items: center">
<label for="P_LastName" >الاسم الاخير</label>
<input
type="text"
name="P_LastName"
id="P_LastName"
autocomplete="off"
/>
<small>Error message</small>
</div>
<div class="input" style="display:flex; flex-direction: row; justify-content: center; align-items: center" lang="en" >
<label for="P_Email" >البريد الالكتروني</label>
<input
type="text"
name="P_Email"
id="P_Email"
placeholder="[email protected]"
autocomplete="off"
/>
<small>Error message</small>
</div>
<div class="input" lang="en" style="display:flex; flex-direction: row; justify-content: center; align-items: center">
<label for="P_PhoneNum">رقم الهاتف </label>
<input
type="text"
name="P_PhoneNum"
id="P_PhoneNum"
placeholder="05xxxxxxxx"
autocomplete="off"
/>
<small>Error message</small>
</div>
<div class="input" lang="en" style="display:flex; flex-direction: row; justify-content: center; align-items: center">
<label for="ParentID" >اسم المستخدم </label>
<input
type="text"
name="ParentID"
id="ParentID"
autocomplete="off"
/>
<small>Error message</small>
</div>
<div class="input" lang="en" style="display:flex; flex-direction: row; justify-content: center; align-items: center">
<label for="Password">كلمة المرور </label>
<input
type="password"
name="Password"
id="Password"
placeholder="********"
/>
<small>Error message</small>
</div>
<button>إكمال</button>
<br><br>
<label style="font-size: 13px; font-weight: bold; text-align: center; margin-right: 130px; width: 200px;">لديك حساب بالفعل؟<a href="Sign_in.php">اضغط هنا</a></label>
</form>
</div>
</body>