javascript
黄铜渣渣
这个作者很懒,什么都没留下…
展开
-
上下左右无间断滚动
<!--//适合上下滚动 --> var speed=1//速度数值越大速度越慢 var rollmain=document.getElementById("demo") var rollbegin=document.getElementById("demo1") var rollfollow=document.getElementById原创 2017-05-31 15:54:20 · 316 阅读 · 0 评论 -
angular学习
<div ng-app="" ng-init="firstName='John';quantity=1;price=5;names=['Jani','Hege','Kai'];names2=[ {name:'Jani',country:'Norway'}, {name:'Hege',country:'Sweden'}, {name:'Kai',country:'Denmark'}]">原创 2017-11-14 15:20:18 · 130 阅读 · 0 评论 -
dom学习
dom学习 //改变链接 function changeLink() { document.getElementById('myAnchor').innerHTML="访问 W3School" document.getElementById('myAnchor').href="http://www.w3school.com.cn" document.getElementById('myAncho原创 2017-11-14 15:18:41 · 165 阅读 · 0 评论 -
粘贴截图完成上传功能
<?php header("Access-Control-Allow-Origin:*"); $url = 'http://'.$_SERVER['HTTP_HOST']; $file = (isset($_POST["file"])) ? $_POST["file"] : ''; if($file) { $data = base64_decode(str_replace('data:i转载 2017-08-28 17:41:26 · 862 阅读 · 0 评论 -
javascript点击复制自己
function copythis(obj) { const range = document.createRange(); range.selectNode(obj); const selection = window.getSelection(); if(selection.rangeCount > 0) selection.removeAllRanges(); selection.addRa原创 2017-08-25 11:15:02 · 258 阅读 · 0 评论 -
点击弹出窗口
点击弹出div @charset "utf-8"; .tan { display:none; top:20%; left:50%; margin-left:-250px; padding:20px; width:500px; height:300px; position:relative; border:1px solid #ccc; border-radius:25px;原创 2017-07-10 14:08:08 · 281 阅读 · 0 评论 -
javascript基础2012
显示时间 var today = new Date(); var week; var date; if(today.getDay()==0) week="星期日"; if(today.getDay()==1) week="星期一"; if(today.getDay()==2) week="星期二"; if(today.getDay(原创 2017-05-31 15:30:38 · 182 阅读 · 0 评论 -
各种选项卡
无标题文档 function openP(_id) { var select_id = parseInt(_id.replace("box","")); for (i=1;i<=4;i++) { if (i==select_id) { document.getElementById("box"+i).style.display = "block"; } else { document.getEl原创 2017-05-31 16:54:56 · 519 阅读 · 1 评论 -
各种导航
无标题文档 function show(d1){ document.getElementById(d1).style.display='block';//显示层 } function hide(d1){ document.getElementById(d1).style.display='none'; //隐藏层 } *{ margin:0; padding:0;} .demo { p原创 2017-05-31 16:29:20 · 278 阅读 · 0 评论 -
js表单验证
http://www.w3school.com.cn/js/js_form_validation.asp <html> <head> <script type="text/javascript"> function validate_required(field,alerttxt) { with (field) { if (value==nu...原创 2019-01-08 09:37:06 · 162 阅读 · 0 评论