⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ye24.htm

📁 最完整的Javascript 特效
💻 HTM
字号:
<html>

<!-- Mirrored from www.yesky.com/imagesnew/software/jscript/ye24.htm by HTTrack Website Copier/3.x [XR&CO'2007], Tue, 15 Apr 2008 09:00:10 GMT -->
<head>
<title>英文名字变日文</title>
<style type="text/css">
<!--
body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
 A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active     { font: 9pt "宋体"; cursor: hand; color: #FF0033 }
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Momoko Sakura -->
<!-- Modified By:  Ronnie T. Moore, Editor -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function isvowel(v) {
if ((v == "a") || (v == "e") || (v == "i") || (v == "o") || (v == "u")) {
return true;
}
else {
return false;
   }
}
function toJapanese(inp) {
name1 = inp;
otp = "";
cnt = 0;
k = "";
l = "";
inp = inp.toLowerCase();
while (cnt <= inp.length - 1) {
k = inp.charAt(cnt);
if ((cnt + 1) > (inp.length - 1)) {
l = "u";
}
else {
l = inp.charAt(cnt+1);
}
if ((k == " ") || (k == "-") || (k == "'")) {
otp = otp + k;
cnt += 1;
}
if ((l == "y") && (!isvowel(k))) {
l = "i";
}
if (k == "x") {
if (cnt == 0) {
k = "z";
}
else {
k = "k";
   }
}
if (k == "g") {
if ((l == "e") || (l == "i") || (l == "y")) {
k = "j";
}
else { 
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + k + "u";
cnt += 1;
      }
   }
}
if (k == "j") {
if ((l == "a") || (l == "u") || (l == "o")) {
otp = otp + k + l;
cnt +=2;
}
if ((l == "e") || (l == "i")) {
otp = otp + "ji";
cnt += 2;
   }
}
if (k == "y") {
if ((l == "a") || (l == "u") || (l == "o")) {
otp = otp + k + l;
cnt += 2;
}
else {
k = "i";
   }
}
if (k == "m") {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
if ((l == "b") || (l == "m") || (l == "p")) {
otp = otp + "n";
cnt += 1;
}
else {
otp = otp + "mu";
cnt += 1;
      }
   }
}
if (isvowel(k) || ((k == "n") && (!isvowel(l)))) {
otp = otp + k;
cnt = cnt + 1;
}
if (k == "q") {
k = "k";
}
if (k == "v") {
k = "b";
} 
if (k == "l") {
k = "r";}
if (k == "c") {
if (l == "h") {
otp = otp + "chi"; 
cnt += 3;
}
else {
if ((l == "e") || (l == "i") || (l == "y")) {
k = "s";
}
else {
k = "k";
      }
   }
}
if (k == "w") {
if ((l == "a") || (l == "o")) {
otp = otp + k + l;
cnt += 2;
}
else {
if ((l == "i") || (l=="e")) {
otp = otp + "u" + l;
cnt += 2;
}
else {
k = "b";
      }
   }
}
if ((k == "b") || (k == "k") || (k == "r")) {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + k + "u";
cnt += 1;
   }
}
if (k == "d") {
if ((l == "i") || (l == "a") || (l == "e")) {
otp = otp + "de";
cnt += 2;
}
if ((l == "u") || (l == "o")) {
otp = otp + "do";
cnt += 2;
}
if (!isvowel(l)) {
otp = otp + "de";
cnt += 1;
   }
}
if (k == "f") {
otp = otp + "fu"; 
cnt += 1;
if (isvowel(l)) {
cnt += 1;
   }
}
if (k == "h") {
if (l == "u") {
otp = otp + "fu";
cnt += 2;
}
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "fu";
cnt += 1;
      }
   }
}
if (k == "z") {
if (l == "i") {
k = "j";
} 
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "zu";
cnt += 1;
      }
   }
}
if (k == "n") {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
   }
}
if (k == "p") {
if (l == "h") {
otp = otp + "fu";
cnt += 2;
}
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "pu";
cnt += 1;
   }
}
if (k == "s") {
if ((l == "i") || (l == "h")) {
otp = otp + "shi";
cnt += 2;
if (l == "h") {
cnt += 1;
   }
}
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "su";
cnt += 1;
      }
   }
}
if (k == "t") { 
if ((l == "a") || (l == "e") || (l == "o")) {
otp = otp + k + l;
cnt += 2;
}
if ((l == "u") || ((!isvowel(l)) && (!(l == "h")))) {
otp = otp + "tsu";
cnt += 1;
if (l == "u") {
cnt += 1;
} 
if ((l == "s") && (inp.charAt(cnt + 1) == "u")) {
cnt += 2;
   }
}
if (l == "i") {
otp = otp + "chi";
cnt += 2;
}
if (l == "h") {
otp = otp + "fu";
cnt += 3;
      }
   }
}
name2 = "" + otp.charAt(0).toUpperCase();
for (j = 1; j <= otp.length - 1; j++) {
name2 += otp.charAt(j);
}
alert(name1 + " is pronounced in Japanese as: \"" + name2 + "\"");
}
//  End -->
</script>
<body >
<center><font color=red face="隶书" size=6>英文名字变日文</font></center>
<br>
<br><center>
<table border=5 bordercolor=black borderlight=green>
<tr><td align=center><font size=4 color=red face="Arial, Helvetica, sans-serif"><strong>下面为效果显示区!</strong></font></td></tr>
<tr><td align=center height=50 width=220><form>
Your Name:  <input type=text name="personname" size=15>
<input type=button value="Show Japanese Name!" onClick="toJapanese(this.form.personname.value);">
</form></td></tr></table></center>
<br>
<br>
<center>
<textarea name=source rows=12 cols=55 class=yk9>
脚本说明:
第一步:把如下代码加入
<!-- Mirrored from www.yesky.com/imagesnew/software/jscript/ye24.htm by HTTrack Website Copier/3.x [XR&CO'2007], Tue, 15 Apr 2008 09:00:10 GMT -->
<head>区域中
<SCRIPT LANGUAGE="JavaScript">
<!-- Original:  Momoko Sakura -->
<!-- Modified By:  Ronnie T. Moore, Editor -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function isvowel(v) {
if ((v == "a") || (v == "e") || (v == "i") || (v == "o") || (v == "u")) {
return true;
}
else {
return false;
   }
}
function toJapanese(inp) {
name1 = inp;
otp = "";
cnt = 0;
k = "";
l = "";
inp = inp.toLowerCase();
while (cnt <= inp.length - 1) {
k = inp.charAt(cnt);
if ((cnt + 1) > (inp.length - 1)) {
l = "u";
}
else {
l = inp.charAt(cnt+1);
}
if ((k == " ") || (k == "-") || (k == "'")) {
otp = otp + k;
cnt += 1;
}
if ((l == "y") && (!isvowel(k))) {
l = "i";
}
if (k == "x") {
if (cnt == 0) {
k = "z";
}
else {
k = "k";
   }
}
if (k == "g") {
if ((l == "e") || (l == "i") || (l == "y")) {
k = "j";
}
else { 
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + k + "u";
cnt += 1;
      }
   }
}
if (k == "j") {
if ((l == "a") || (l == "u") || (l == "o")) {
otp = otp + k + l;
cnt +=2;
}
if ((l == "e") || (l == "i")) {
otp = otp + "ji";
cnt += 2;
   }
}
if (k == "y") {
if ((l == "a") || (l == "u") || (l == "o")) {
otp = otp + k + l;
cnt += 2;
}
else {
k = "i";
   }
}
if (k == "m") {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
if ((l == "b") || (l == "m") || (l == "p")) {
otp = otp + "n";
cnt += 1;
}
else {
otp = otp + "mu";
cnt += 1;
      }
   }
}
if (isvowel(k) || ((k == "n") && (!isvowel(l)))) {
otp = otp + k;
cnt = cnt + 1;
}
if (k == "q") {
k = "k";
}
if (k == "v") {
k = "b";
} 
if (k == "l") {
k = "r";}
if (k == "c") {
if (l == "h") {
otp = otp + "chi"; 
cnt += 3;
}
else {
if ((l == "e") || (l == "i") || (l == "y")) {
k = "s";
}
else {
k = "k";
      }
   }
}
if (k == "w") {
if ((l == "a") || (l == "o")) {
otp = otp + k + l;
cnt += 2;
}
else {
if ((l == "i") || (l=="e")) {
otp = otp + "u" + l;
cnt += 2;
}
else {
k = "b";
      }
   }
}
if ((k == "b") || (k == "k") || (k == "r")) {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + k + "u";
cnt += 1;
   }
}
if (k == "d") {
if ((l == "i") || (l == "a") || (l == "e")) {
otp = otp + "de";
cnt += 2;
}
if ((l == "u") || (l == "o")) {
otp = otp + "do";
cnt += 2;
}
if (!isvowel(l)) {
otp = otp + "de";
cnt += 1;
   }
}
if (k == "f") {
otp = otp + "fu"; 
cnt += 1;
if (isvowel(l)) {
cnt += 1;
   }
}
if (k == "h") {
if (l == "u") {
otp = otp + "fu";
cnt += 2;
}
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "fu";
cnt += 1;
      }
   }
}
if (k == "z") {
if (l == "i") {
k = "j";
} 
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "zu";
cnt += 1;
      }
   }
}
if (k == "n") {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
   }
}
if (k == "p") {
if (l == "h") {
otp = otp + "fu";
cnt += 2;
}
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "pu";
cnt += 1;
   }
}
if (k == "s") {
if ((l == "i") || (l == "h")) {
otp = otp + "shi";
cnt += 2;
if (l == "h") {
cnt += 1;
   }
}
else {
if (isvowel(l)) {
otp = otp + k + l;
cnt += 2;
}
else {
otp = otp + "su";
cnt += 1;
      }
   }
}
if (k == "t") { 
if ((l == "a") || (l == "e") || (l == "o")) {
otp = otp + k + l;
cnt += 2;
}
if ((l == "u") || ((!isvowel(l)) && (!(l == "h")))) {
otp = otp + "tsu";
cnt += 1;
if (l == "u") {
cnt += 1;
} 
if ((l == "s") && (inp.charAt(cnt + 1) == "u")) {
cnt += 2;
   }
}
if (l == "i") {
otp = otp + "chi";
cnt += 2;
}
if (l == "h") {
otp = otp + "fu";
cnt += 3;
      }
   }
}
name2 = "" + otp.charAt(0).toUpperCase();
for (j = 1; j <= otp.length - 1; j++) {
name2 += otp.charAt(j);
}
alert(name1 + " is pronounced in Japanese as: \"" + name2 + "\"");
}
//  End -->
</script>


第二步:把如下代码加入<body>区域中
<form>
Your Name:  <input type=text name="personname" size=15>
<input type=button value="Show Japanese Name!" onClick="toJapanese(this.form.personname.value);">
</form>
</textarea>
<SCRIPT LANGUAGE="JavaScript">

<!-- hide

function goHist(a) 

{

   history.go(a);

}

//-->

</script>

<FORM METHOD="post">
<INPUT TYPE="button" VALUE="返回" onClick="goHist(-1)" >
</form>
</center>
<br>
<br>
</body>

<!-- Mirrored from www.yesky.com/imagesnew/software/jscript/ye24.htm by HTTrack Website Copier/3.x [XR&CO'2007], Tue, 15 Apr 2008 09:00:10 GMT -->
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -