首先
<script>
var chinese = [
var len = [
var ydm =[
function etchinese(s)
{
//將單個數字轉化成中文
s=
sslen = s
var result=
for(var i=
{
result+=chinese[s
}
return result;
}
function specialcharacter(s)
{
//對特殊情況進行處理
s=
var result=
if(s
{
if(s
{
if(s
return len[
}
if(s
return chinese[s
}
return etchinese(s)
}
function transformchinese(s)
{
//驗證輸入的日期格式
var datePat = /^(\d{
var matchArray = s
var ok=
if (matchArray == null) return false;
for(var i=
{
ok+=specialcharacter(matchArray[i]
}
return ok;
}
</script>
然後
YYYY
C#時間格式轉換中文顯示:
<input type=text name=
<input type=button onclick=
value=
From:http://tw.wingwit.com/Article/program/net/201311/13713.html