11.28代码

1

<script>
        var oTime = setInterval(shijian,1000);
        function shijian(){
            var date = new Date();
            document.getElementById("demo").innerHTML = date.toLocaleTimeString();
        }
        function xuan(){
            document.getElementById("text").innerHTML;
        }
    </script>
    <body>
        <button type="button" onclick="setTimeout(myname,3000)">试一试</button>
        <p id="demo"></p>
        <button onclick="clearInterval(oTime)">停止时间</button>
        <button onclick="shijian()">开始</button>
    </body>

 2

<body>
    <h4>登陆成功</h4>
    <p>
        <span id="second">5</span>秒回到主页&nbsp;<a href="https://www.qzoiedu.com/">
            返回</a>
    </p>
    <script>
        var i = 5;
        setInterval(count, 1000);
        function count() {
            i--;
            document.getElementById("second").innerHTML = i;
            if (i == 1) {
                location.assign("https://www.qzoiedu.com/")
            }
        }
    </script>
</body>

 3

<body>
    <h1>第一个页面</h1>
    <p>欢迎来到第一个页面</p>
    <button onclick="goToSecondPage()">当前时间</button>
    <script>
        function goToSecondPage() {
            window.location.href = "bigone.html";
        }
    </script>
</body>

<body>
    <h1>第二个页面</h1>
    <p>欢迎来到第二个页面</p>
    <button onclick="goToFirstPage()">返回第一个页面</button>
    <script>
        function goToFirstPage() {
            window.location.href = "firstPage.html";
        }
    </script>
</body>
<body>
    <p>欢迎</p>
    <button onclick="goToSecondPage()">前往第二个页面</button>
    <script>
        function goToSecondPage() {
            window.location.href = "secondPage.html";
        }
      </script>  
    <button onclick="goTozhuyem()">返回主页面</button>
    <script>
        function goTozhuyem() {
            window.location.href = "3.html";
        }
    </script>  
</body>
<body>
    <p>不欢迎</p>
    <button onclick="goToFirstPage()">返回第一个页面</button>
    <script>
        function goToFirstPage() {
            window.location.href = "firstPage.html";
        }
    </script>

    <button onclick="goTozhuyem()">返回主页面</button>
    <script>
        function goTozhuyem() {
            window.location.href = "3.html";
        }
    </script>
</body>

 4

<style>
        body{
            background-color:aqua;
        }
        h2{
            text-align: center;
        }
    </style>
</head>
<body>
    <h2>显示占用区域</h2>
    <hr>
    <br>
    <script type="text/javascript">
        function GetWinSize(){
            if (navigator.userAgent.indexOf("MSIE") > 0){
                var sSize = (document.body.clientWidth * document.body.clientHeight)
                return sSize;
            }else{
                var sSize=(window.outerWidth * window.outerHeight);
                return sSize;
            }
        }
        var percent = Math.round(GetWinSize()/(screen.width * screen.height)* 100 )
        document.write("此窗口占用当前显示器大约" + percent + "%的区域");
    </script>
</body>

 5

<body>
		<span id="time"></span>
		<script>
			function show() {
				var date = new Date();
				var hour = date.getHours();
				var minute = date.getMinutes();
				var second = date.getSeconds();
				var element = document.getElementById("time");
				element.innerHTML =  "现在是北京时间"+hour+":"+minute+":"+second;          
			}
			show();
			setInterval("show()",1000);
		</script>
	</body>

  • 10
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
以下是使用Python计算密立根油滴实验静态法数据的示例代码,希望对你有所帮助。 ```python import numpy as np # 输入实验数据 d = np.array([7.16, 8.22, 9.98, 10.10, 11.28]) * 1e-6 # 滴径 V = np.array([7.4, 7.2, 6.3, 6.1, 5.4]) * 1e-3 # 滴电荷量 g = 9.81 # 重力加速度 n_air = 1.00029 # 空气折射率 p_air = 101325 # 空气压强 T = 293 # 温度 # 计算电荷量的平均值和标准差 V_mean = np.mean(V) V_std = np.std(V, ddof=1) # 计算电荷量的误差 e_V = 0.01 / np.sqrt(3) * V_mean # 仪器误差 e_V_tot = np.sqrt(e_V ** 2 + (V_std / np.sqrt(len(V))) ** 2) # 总误差 # 计算电荷量的元电荷数 e = 1.602176634e-19 # 元电荷 q = V_mean / 4 / np.pi / n_air / e * np.sqrt(18 * np.pi * T / p_air / g) # 元电荷数 # 计算元电荷数的误差 e_q = np.sqrt((1 / (4 * np.pi * n_air * e)) ** 2 * (e_V_tot / np.sqrt(18 * np.pi * T / p_air / g)) ** 2 + (V_mean / 4 / np.pi / n_air / e / np.sqrt(18 * np.pi * T / p_air / g) / e) ** 2 * (np.sqrt(9 / 2 * np.pi * T / p_air / g) / 2 / np.pi / n_air * 0.01 / np.sqrt(3)) ** 2) # 输出结果 print(f"电荷量的平均值为:{V_mean:.4e} C") print(f"电荷量的标准差为:{V_std:.4e} C") print(f"电荷量的误差为:{e_V_tot:.4e} C") print(f"元电荷数为:{q:.4e}") print(f"元电荷数的误差为:{e_q:.4e}") ``` 在这个示例代码中,我们首先输入了实验数据,包括滴径和滴电荷量。然后我们计算了电荷量的平均值、标准差和误差,以及元电荷数和元电荷数的误差。最后输出了计算结果。 需要注意的是,这个示例代码只适用于使用静态法进行密立根油滴实验的情况。如果使用动态法,需要使用不同的计算公式。同时,这个代码只是一个示例,具体的计算方法可能因实验条件等因素而有所不同,需要根据具体情况进行修改。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值