gpt4 book ai didi

javascript -

标 checkout 现又消失?

转载 作者:行者123 更新时间:2023-11-30 11:15:58 28 4
gpt4 key购买 nike

<分区>

我有一个非常简单的程序,它使用 JS 将结果输出到 <p>标签。每当我运行结果时,<p>标 checkout 现并迅速消失。

代码:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>A2Q4</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<script>
function NumberStats(number) {
if(number.indexOf('soen287')>=0||number.indexOf('comp249')>=0||number.indexOf('assignment2')>=0) {
number = number.replace(/soen287/gi,"SOEN287");
number = number.replace(/comp249/gi,"COMP249");
number =number.replace(/assignment2/gi,"ASSIGNMENT2");
document.getElementById("p1").innerHTML ="&gt;&gt; "+number;
} else{
number=number.toUpperCase();
document.getElementById("p1").innerHTML ="&gt;&gt; "+number;
}
}
</script>
<center>
<br>
<form name="myForm">
<h1>Text detector<br/>A program created by Mohanad Arafe</h1>
<input type="text" name="amount" placeholder="Enter your sentence"/>
<button onclick="NumberStats(amount.value)">Try it</button>
<p id="p1"></p>
</form>
</body>
</html>

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com