day07-2

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="Jquery/jquery-3.4.1.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $("button").click(function(){
                alert($(":text").val());
            });
        });
    </script>
</head>
<body>
<p>值: <input type="text" name="user" value="" /></p>
<button>显示文本域的值</button>
</body>
</html>

day07-2

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var i,a,b,c;
        for (i=100;i<1000;i++){
            a=parseInt(i/100);
            b=parseInt((i-a*100)/10);
            c=parseInt(i-a*100-b*10);
            if (a*a*a+b*b*b+c*c*c==i){
                document.write(i+",");
            }
        }
    </script>
</head>
<body>

</body>
</html>

day07-2

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        function alerInfo(msg) {
            alert(msg);
        }


        function calculate(x, c, y) {
            if ('+'==c) {
                return x + y;
            }
            if ('-'==c) {
                return x-y;
            }
            if ('*'==c) {
                return x*y;
            }
            if ('/'==c) {
                return x/y;
            }
        }
        alerInfo(calculate(1,'+',100));
    </script>
</body>
</html>

day07-2

上一篇:大数据之路week06--day07(Linux中的mysql的离线安装)


下一篇:自学Java之day07_API的初识及使用