이것은 내가 너희에게서 얻는 것이다! 작업 3
<script type="text/javascript">
function check()
{
var correctArray = new Array ("cat", "car");
correctArray[0]= 0;
var wrong = new Array("tac", "rac");
var score = 0;
if(correctArray().index.length == wrong().index.length){
alert("This is correct:" , correctArray());
}else{
alert(" please try again ");
}
return correctArray++, score++;
}
</script>
</head>
<body>
<form>
<h3> Words Decoder </h3>
The scrambled word is: <input type="text" name="showlabel" value="" disabled="disabled" onclick='check().getElementById("wrong")' /> <br/><br/>
Please enter the unscrambeld word: <input type="text" name="userInput" value="" />
<input type="submit" value="Check" onclick="check()" /><br/><br/>
The Score is : <input type="text" name="score" value="" disabled="disabled" /><br/><br/>
</form>
</body>
그것을 위해 같이해야한다 :
할당 1 .. 난 다른 코드를 생성 ,,하지만 메신저 적합한 솔루션을 알아 내려고 쓸 것 예 :
"tac"이라는 단어가 표시됩니다. 사용자가 "cat"을 입력합니다. 대답은 정확하고 사용자 점수는 1입니다. "niol"이라는 단어가 표시됩니다. 사용자가 "oinl"을 입력합니다. 대답이 정확하지 않고 사용자에게 경고를 보내며 점수는 그대로 유지됩니다. 다음 단어가 게임에 표시됩니다. 마지막 단어 다음에 최종 점수가 플레이어에게 주어집니다.
한 가지 명심해야 할 것은 많은 단어가 아나그램이며, 문자를 하나 이상의 올바른 단어를 만들기 위해 재 배열 할 수 있습니다. 어느 단어도 아나 그램이 아니거나 각 단어에 대한 올바른 답을 찾으십시오. – kennebec