请问是否正确

来源:3-19 编程练习

蛤小蛤

2019-06-07 15:30:17

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8" />
<title></title>
</head>
<body>
<script>
      //预设代码
      var b_1 = "50px",
        b_2 = "px50",
        b_3 = "050px",
        b_4 = "50.12345",
        b_5 = "50.123px45";
      document.write(parseFloat(b_1));
      document.write(parseFloat(b_2));
      document.write(parseFloat(b_3));
      document.write(parseFloat(b_4));
      document.write(parseFloat(b_5));
    </script>
</body>
</html>


写回答

1回答

好帮手慕慕子

2019-06-07

同学你好。 代码正确, 效果实现的可以,继续加油!

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


0

0 学习 · 40143 问题

查看课程