小编Sir*_*der的帖子

确认功能不起作用

*<html>
<head>
<title>practise</title>
<script type="text/javascript">
function confirm() {
    var r = confirm("Press the button");
    if (r == true) {
        alert("You are right");
    } else {
        alert("You are wrong");
    }
}

</script>
</head>

<body>
        <input type="button" name="submit" value="showtime" onclick="confirm()"/>
    </div>
</body>
</html>*
Run Code Online (Sandbox Code Playgroud)

我想知道问题是什么.它不起作用,但它与http://www.w3schools.com/js/js_popup.asp中的相同

html javascript confirm function

4
推荐指数
1
解决办法
2万
查看次数

javascript"for(x in y)"语句

//just copied this code from w3schools
var person={fname:"John",lname:"Doe",age:25}; 

for (x in person)
{
document.write(person[x] + " ");
}
Run Code Online (Sandbox Code Playgroud)

我想知道,我必须假设而不是"x".

javascript for-loop for-in-loop

1
推荐指数
1
解决办法
2万
查看次数

标签 统计

javascript ×2

confirm ×1

for-in-loop ×1

for-loop ×1

function ×1

html ×1