ipconfig /flushdns阅读全文>>
function replaceParamVal(paramName,replaceWith) {
var oUrl = this.location.href.toString();
var re=eval('/('+ paramName+'=)([^&]*)/gi');
if (re.test(oUrl)){
var nUrl = oUrl.replace(re,paramName+'='+replaceWith);
}else{
if(oUrl.indexOf('?')>0){
var nUrl = oUrl+"&am...阅读全文>>
$regex操作符的介绍
MongoDB使用$regex操作符来设置匹配字符串的正则表达式,使用PCRE(Pert Compatible Regular Expression)作为正则表达式语言。
regex操作符
{<field>:{$regex:/pattern/,$options:’<options>’}}
{<field>:{$regex:’pattern’,$options:’<options>’}}
{<field>:{$regex:/pattern/<options>}}
正则表达式对象
{&l...阅读全文>>
<script language="javascript">
//防止页面后退
history.pushState(null, null, document.URL);
window.addEventListener('popstate', function () {
history.pushState(null, null, document.URL);
});
</script>阅读全文>>
阅读全文>>
var killErrors = function(value) {
return true
};
window.onerror = null;
window.onerror = killErrors;
虽然没什么用,但是上线后不想控制台输出内容阅读全文>>
阅读全文>>
情景一:input文本框是纯色背景的
解决办法:
input:-webkit-autofill { -webkit-box-shadow: 0 0 0px 1000px white inset; -webkit-text-fill-color: #333;
}
情景二:input文本框是使用图片背景的
解决办法:
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0)
{ var _interval = window.setInterval(function () { v...阅读全文>>
阅读全文>>
myWindow=window.open('','','width=200,height=100')
myWindow.document.write("This is 'myWindow'")
myWindow.focus()
myWindow.opener.document.write("This is the parent window")阅读全文>>