
javascript
键盘哥
还是一个刚入行的菜鸟!!
展开
-
js初级脚本算法
1翻转字符串算法挑战 先把字符串转化成数组,再借助数组的reverse方法翻转数组顺序,最后把数组转化成字符串function reverseString(str){ str = str.split('').reverse().join(''); return str; } reverseString("hello");2阶乘算法 如果用字母n来代表一个整数,阶乘代表着所有小于或原创 2017-12-24 13:52:19 · 720 阅读 · 0 评论 -
关于页面轮转图的实现!
1.在jsp中创建容器用来存放图片原创 2018-01-20 11:08:53 · 2078 阅读 · 0 评论 -
关于获取单选按钮的值,赋值以及禁用按钮的集合
1.html布局 审核结果 通过 回退 审核说明 2.获取选中redio的值,以及赋值 //获取值 v原创 2018-01-20 11:42:01 · 629 阅读 · 0 评论 -
ajax上传文件
1.jsp<form class="form-inline" id="form1" enctype="multipart/form-data"> <div style="float:left; width: 140px;height: 194px;background-color : #fff;position:relative ;left:30px;top:20px; tex...原创 2018-05-23 17:37:48 · 208 阅读 · 0 评论 -
js限制图片大小格式等
// 图片类型验证 function verificationPicFileType(file) { var flag=false; var fileTypes = [".jpg", ".png",".JPG", ".PNG"]; var filePath = file.value; //当括号里面的值为0、空字符、false 、null 、undefin...原创 2018-05-23 17:39:57 · 2407 阅读 · 0 评论 -
js中获取项目路径
//获取项目路径 var curRequestPath = window.document.location.href; console.log("curRequestPath:" + curRequestPath); //获取项目请求路径 /people/toGetPeopleList.action var pathName = window.document.location.path...原创 2018-07-15 23:08:45 · 441 阅读 · 0 评论 -
鼠标悬浮放大图片的具体实现
代码实现:<img src="${trexpert.picture}" alt="头像" width="20" height="20" class="apreview" title="证件照"/>$(function() { imagePreview(); }); function imagePreview() { // 图片距离鼠标的位原创 2018-07-15 23:21:48 · 2116 阅读 · 0 评论