This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pageGetServingListNew() { | |
$window.history.pushState({"currentPage": vm.currentPage}, '我的服务', $location.absUrl()); | |
console.log( $window.history.state, " $window.history.state;"); | |
getServingListNew(); | |
} | |
$window.onpopstate = function () { | |
// 获得存储在该历史记录点的currentPage对象 | |
var currentPage = $window.history.state; | |
console.log(currentPage, "history json"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by candice on 15/12/23. | |
*/ | |
var dpr, rem, scale; | |
var docEl = document.documentElement; | |
var fontEl = document.createElement('style'); | |
var metaEl = document.querySelector('meta[name="viewport"]'); | |
dpr = window.devicePixelRatio || 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function transitionEndEventName () { | |
var i, | |
undefined, | |
el = document.createElement('div'), | |
transitions = { | |
'transition':'transitionend', | |
'OTransition':'otransitionend', // oTransitionEnd in very old Opera | |
'MozTransition':'transitionend', | |
'WebkitTransition':'webkitTransitionEnd' | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.browser={ | |
versions:function(){ | |
var u = navigator.userAgent, app = navigator.appVersion; | |
return { | |
trident: u.indexOf('Trident') > -1, //IE内核 | |
presto: u.indexOf('Presto') > -1, //opera内核 | |
webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核 | |
gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,//火狐内核 | |
mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端 | |
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dpr, rem, scale; | |
var docEl = document.documentElement; | |
var fontEl = document.createElement('style'); | |
var metaEl = document.querySelector('meta[name="viewport"]'); | |
dpr = window.devicePixelRatio || 1; | |
rem = docEl.clientWidth * dpr / 10; | |
scale = 1 / dpr; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
css | |
.checker { | |
position: relative; | |
float: right; | |
display: inline-block; | |
margin-top: 1rem; | |
margin-right: 2rem; | |
} | |
.beau-radio.active { | |
border: 0px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Possible Errors(可能的错误) | |
The following rules point out potential errors in your CSS.(潜在错误) | |
Beware of box model size(当心盒模型) | |
Require properties appropriate for display (给display使用合适的属性) | |
Disallow duplicate properties(不要使用重复属性) | |
Disallow empty rules(不要使用空属性值) | |
Require use of known properties(不要使用未知属性) | |
Compatibility(兼容性) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".dia").on("click",function(){ | |
var $wrap = $('<div class="alertWrap"></div>'); | |
var $content = $('<div class="alert"></div>'); | |
var str='<table><tbody><tr><td colspan="6"><i class="close" style="float: right;">X</i></td></tr>'+ | |
'<tr><td><input type="password" maxlength="1"/></td><td><input type="password" maxlength="1"/></td><td><input type="password"/></td><td><input type="password"/></td><td><input type="password"/></td><td><input type="text"/></td></tr></tbody></table>'; | |
//* $content.html(str);*// | |
var msg = 'aaa'; | |
$content.html(str); | |
$wrap.append($content); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
asds | |
</html> |