老师,检查一下

来源:3-18 编程练习

慕仙8428333

2019-04-17 15:42:03

<!DOCTYPE html>

<html>

<head>

    <meta charset="UTF-8">

    <title>数据类型转换</title>

</head>

<body>

<script>

    var a="50px",b="px50",c="50px50",d="50.51";

    console.log(parseInt(a));

    console.log(parseInt(b));

    console.log(parseInt(c));

    console.log(parseInt(d));

    document.write(typeof(parseInt(a)));

    document.write(typeof(parseInt(b)));

    document.write(typeof(parseInt(c)));

    document.write(typeof(parseInt(d)));

</script>

</body>

</html>


写回答

1回答

好帮手慕慕子

2019-04-17

同学你好, 代码书写正确, 效果实现的也很好, 继续努力哦

欢迎采纳, 祝学习愉快~~~

0

0 学习 · 36712 问题

查看课程