摘要: <body> <!-- 判断数组中是否存在60这个元素 返回布尔类型 --> <script type="text/javascript"> var arr=[1,2,5,6,4,8,4,4,4,5] function has(arr,n){ //判断数组里面有没有n这个数据 //先假设数组里面没有 阅读全文
posted @ 2020-04-14 18:00 阿向向 阅读(1238) 评论(0) 推荐(0) 编辑
摘要: <style type="text/css"> span{ border: double 2px orangered; background-color: orange; } b{ color: red; } b:hover{ background-color: yellow; font-size: 阅读全文
posted @ 2020-04-14 17:21 阿向向 阅读(644) 评论(0) 推荐(0) 编辑
摘要: <body> <div style="margin:0 auto"> <h2>用户注册</h2> <form name="regform" action=""> <div class="mystyle">用户名:<input type="text" value="" id="user" name=" 阅读全文
posted @ 2020-04-14 13:00 阿向向 阅读(133) 评论(0) 推荐(0) 编辑
摘要: <body> <div style="margin:0 auto"> <h2>用户注册</h2> <form name="regform" action=""> <div class="mystyle">用户名:<input type="text" value="" id="user" name=" 阅读全文
posted @ 2020-04-14 11:48 阿向向 阅读(181) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> var arr2=[23,56,8,4,6,9,2,0,13,55,94,344,3] /* 选择排序 * 假设外层循环变量 * 里层循环变量开始时外层变量+1 * 交换外层变量 */ for ( var i=0;i<arr2.leng 阅读全文
posted @ 2020-04-14 08:30 阿向向 阅读(110) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> /* btn.onclick=function() { console.log('我被点击了') }*/ //报错 // 浏览器事件绑定在windown上// 表示当所有资源加载完毕后触发 window.onload=function( 阅读全文
posted @ 2020-04-14 08:28 阿向向 阅读(140) 评论(0) 推荐(0) 编辑
摘要: <style type="text/css"> *{ margin: 10px; padding: 5px; box-sizing: border-box; } span{ /*width: 200px; height: 100px;*/ display: inline-block; text-al 阅读全文
posted @ 2020-04-13 16:24 阿向向 阅读(192) 评论(0) 推荐(0) 编辑
摘要: <body> <div style="width: 300px; height: 100px; border: dotted red 5px; border-radius: 20px; box-sizing: border-box; font:20px/30px '方正舒体'; color:gree 阅读全文
posted @ 2020-04-13 16:23 阿向向 阅读(869) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> /* 三资自幂数 从100~999 每一个的 三次幂 的 和 这个数相等 123 1*1*1+2*2*2+3*3*3 */ // 判断一个数字是不是三次自幂数 var num=153 var a=parseInt(num/100) va 阅读全文
posted @ 2020-04-13 16:22 阿向向 阅读(210) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> document.writeln('打印出1000~2000年中所有的闰年,并以每行四个数的形式输出<br />') //做一个计数器 var count=1 for (var i=1000;i<=2000;i++) { if(i%4 阅读全文
posted @ 2020-04-13 16:21 阿向向 阅读(601) 评论(0) 推荐(0) 编辑