<script>
var password = "測試字符串";
var answer = prompt("what's the password? ","默認值");
if (answer == password)
{alert("輸入的字符串跟'測試字符串'相同");
}
else
{
alert("輸入的js彈出框跟'測試字符串'不同");
</script>
更多信息請查看IT技術專欄
2025國考·省考課程試聽報名