
javascript
knife1220
这个作者很懒,什么都没留下…
展开
-
纯js 数独游戏
<head><script> delayTime=10; board=[]; maplistc = []; maplistr = []; maplistk = []; emptylist = []; notEmptyList={}; run=false; function refresh(){ if(document.getElementById("t")!=null) document.getElementById("t").remove.原创 2020-08-07 14:18:31 · 985 阅读 · 0 评论 -
纯js 祖玛
<style>#myCanvas{ position:absolute; z-index:-1;/*确保在遮盖的元素的上方*/ top:0px; left:0px;}#myCanvasbg{ background:rgba(255,255,255,0);/*关键点*/ position:absolute; z-index:-2;/*确保在遮盖的元素的上方*/...原创 2020-04-24 16:53:44 · 683 阅读 · 0 评论 -
javascript 滑动底部加载事件
// 自定义事件 function ajax_function() { //alert("自定义事件内容"); getMore(); } var timeoutInt; // 要保证最后要运行一次 window.onscroll = function () { setTimeout(function () { if (timeoutI...原创 2018-07-19 13:50:06 · 209 阅读 · 0 评论 -
javascript 时间戳转成时间格式
function timestampToTime(timestamp) { var date = new Date(timestamp );//时间戳为10位需*1000,时间戳为13位的话不需乘1000 Y = date.getFullYear() + '-'; M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+...原创 2018-07-19 13:51:56 · 207 阅读 · 0 评论 -
bootstrap-table 简单应用
1.客户端分页<table id="contentTable" class="table table-striped table-bordered table-condensed"> </table><script src="bootstrap-3.3.7/js/jquery-3.2.1.min.js"></script>原创 2018-07-20 08:47:08 · 226 阅读 · 0 评论 -
css 借助autoflow 属性 实现 选座位效果
1.autoflow属性,如果元素内容的长宽超出元素本身的长宽则会出现滚动条<HTML> <HEAD> <TITLE>测试表格内的滚动条</TITLE> </HEAD> <BODY> <div id="wins" style="position:absolute;h原创 2018-07-20 08:46:49 · 1086 阅读 · 0 评论 -
H5 获取定位信息
function getPosition(callback) { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { latitude = position.coords.latitude;// 获取纬度 longitude = position.c...原创 2018-10-31 13:33:34 · 4347 阅读 · 0 评论 -
iframe 利用postMessage 跨域通信
1.子页面:http://localhost:7080/b.jsp<button onclick="send()">send</button><script>window.addEventListener('message', function(ev) { var data = ev.data; console.info('messa...原创 2018-11-05 16:57:05 · 419 阅读 · 0 评论 -
纯js 连线小游戏
<div style="width:600px;height:800px;"><canvas height=800px width=600px id="can"></canvas></div><script> var timeable=true; var grower,rounder; var start=0; v...原创 2019-08-08 15:51:02 · 867 阅读 · 0 评论