摘要: 弹幕 <!-- <section></section> <div><input type="text" name="" id="" value="1111111"><button>发送</button></div> <script src="./myApi.js"></script> <script 阅读全文
posted @ 2019-09-07 19:19 wenlx 阅读(269) 评论(0) 推荐(0) 编辑
摘要: div:nth-of-type(1){ width: 600px; height: 2px; background: #000; position: absolute; top: 300px; } div:nth-of-type(2){ width: 2px; height: 600px; back 阅读全文
posted @ 2019-09-04 12:13 wenlx 阅读(182) 评论(0) 推荐(0) 编辑
摘要: //文本框监测 <input type="text" id="txt"> <span id="tip"></span> <script> /* 长度为6-16 全是数字为弱 有特殊字符为强 其他为中 */ //给txt绑定事件 var str = "@#$%^&*"; txt.oninput = f 阅读全文
posted @ 2019-09-03 19:19 wenlx 阅读(732) 评论(0) 推荐(0) 编辑
摘要: //寻找两个数组中相同的元素中最小的元素 // var arr1 = [2,3,5,8,1,6]; // var arr2 = [7,0,5,9,4,3,7,0,6]; // var min = Infinity; // function fn(arr1, arr2){ // for(var i = 阅读全文
posted @ 2019-09-02 21:39 wenlx 阅读(273) 评论(0) 推荐(0) 编辑
摘要: var arr = [ { id : 01, name : "zhao", math : 88, chinese : 90, english : 86, }, { id : 02, name : "qian", math : 80, chinese : 86, english : 92, }, { 阅读全文
posted @ 2019-09-02 21:28 wenlx 阅读(99) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2019-09-02 21:27 wenlx 阅读(2110) 评论(0) 推荐(0) 编辑
摘要: // 1. 通过循环按行顺序为一个5×5的二维数组a赋1到25的自然数试编程。 // function arrA(){ // var a = []; // var count = 0; // for(var i = 1; i <= 5; i++){ // var arr = []; // for(v 阅读全文
posted @ 2019-09-01 17:46 wenlx 阅读(258) 评论(0) 推荐(0) 编辑
摘要: + 编写一个函数,生成4位数字的验证码 function code(){ var code = ""; for(var i = 0; i < 4; i++){ var a = randomNum(0, 9); code += a; } return code; } console.log(code( 阅读全文
posted @ 2019-08-29 20:29 wenlx 阅读(1282) 评论(0) 推荐(0) 编辑
摘要: 输入一个数计算该数因数的个数: <input type="text" id="num"> <input type="button" value="因数的个数" id="btn"> --> <!-- <script> btn.onclick = function(){ var val = parseI 阅读全文
posted @ 2019-08-28 21:40 wenlx 阅读(326) 评论(0) 推荐(0) 编辑