支持的标签:<body>, <frame>, <iframe>, <img>, <input type="image">, <link>, <script>, <style>
成功测试使用的标签:<body>, <style>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Login</title>
<meta name="description" content="向客户们真实的呈现菜品,方便食客们的浏览">
<meta name="author">
<script type="text/javascript">
var a=10
function fun2() {
console.log("我得到了交代你")
}
function fun() {
document.getElementById("one").focus();
console.log("onehaha")
}
</script>
</head>
<body onload="fun()" >
<div class="box" style="margin: auto" >
<h2>欢迎光临</h2>
<input id="one" type="text">
<style onload="fun()"></style>
<form action="login" method="post">
<div class="input_box">
<p>账号  <input id="userName" class="text" type="text" name="userName" placeholder="用户账号" onfocus="fun2()"></p>
</div>
<div id="error_box1" calss="error"></div>
<div class="input_box">
<p>密码  <input id="password" class="text" style="color: #FFFFFF !important" style="color: #FFFFFF !important" class="text" type="password" name="password" placeholder="用户密码"></p>
</div>
<div class="input_box1">
<!-- <button type="submit" class="btn1" onclick="return validateCode()">登录</button> -->
<input type="submit" class="btn1" value="登录" />
</div>
</form>
</div>
</div>
<script type="text/javascript">
console.log("one")
</script>
</body>
</html>
onload事件支持的标签||onload设置有些标签无用
最新推荐文章于 2022-12-25 19:48:00 发布