0
<div class="third">
<p>This site requires a password.</p>
<button onclick="password()">Enter password</button>
<center><img src="http://i66.tinypic.com/e0frqo.png"></center>
</div>
<script>
function password() {
var password = readLine("Enter the password to continue");
if(password == "testpwd"){
alert("Status: |Authorized| Your access has been granted. ------>Go to testwebsite.com/main.html<------ ||Have a nice day||");
} else {
alert("Status: Unauthorized Access. Access denied. Try again or leave");
}
}
</script>
해결 방법을 알려주십시오. 나는 HTML을 처음 접했습니다. 이해할 수없는 환상적인 말을하지 마십시오. 고마워.사용자로부터 텍스트 입력을 읽는 방법?
'
? 이 광기는 무엇입니까? –
나는 내가 너 n이라고 말했다. –
코드에는 문제가 너무 많아서 다루지 않을 것이지만, 주된 문제는 'readLine'이 정의되어 있지 않다는 것이다. 사용자 입력을 쉽게 얻을 수있는 방법 (학습 목적)을 찾고 있다면'prompt'를 사용하십시오. –