<script>
var password = "測(cè)試字符串";
var answer = prompt("what's the password? ","默認(rèn)值");
if (answer == password)
{alert("輸入的字符串跟'測(cè)試字符串'相同");
}
else
{
alert("輸入的js彈出框跟'測(cè)試字符串'不同");
</script>
更多信息請(qǐng)查看IT技術(shù)專(zhuān)欄
2025國(guó)考·省考課程試聽(tīng)報(bào)名