-1

私の英語でごめんなさい。
私はこのコードを持っています:

x = 0
y=prompt("Whats your name?");
if (x == "andrea")
{
x=x+1
}
.....
document.write("You made "+ x +" points.");

プロンプトの回答を大文字にするにはどうすればよいですか?
ありがとう。

document.write ではなく、「andrea」などの回答です。ユーザーが答えを書くとき、たとえば「アンドレア」は大文字であることを望みます。

ユーザーが答えを大文字で書かなければならないことを望みます。

4

4 に答える 4

1

もしかして

y=prompt("Whats your name?");
if (y == "andrea")

それ以外の

y=prompt("Whats your name?");
if (x == "andrea")
于 2013-06-19T14:28:08.877 に答える
0
document.write(("Hai fatto "+ x +" punti").toUpperCase());
于 2013-06-19T14:28:21.367 に答える
0

ただ:

var lowerText="Hai fatto "+ x +" punti";
document.write(lowerText.toUpperCase());
于 2013-06-19T14:28:22.157 に答える