JS判断文本框是否获取光标
摘要:<html> <head> <script type="text/javascript"> var t1=document.getElementById("txt1"); function isFocus(){ if(document.activeElement.id=='txt2'){ alert('txt2获得焦点'); } else{ alert('txt2未获得焦点'); } } ...
阅读全文
JS回车键判断
摘要:<script language='javascript'> document.onkeydown=function(){ if (event.keyCode == 13){ alert('回车键.'); } else{ alert('你按错了键.'); } }</script>
阅读全文
SQL统计数量,查询多列问题解决,(因为该列没有包含在聚合函数或 GROUP BY 子句中。)
摘要:select count(1) as pCount,列1,列2,列3 from Tempinner join temp1 on 条件1=条件1group by 列1,列2,列3 order by pCount desc
阅读全文
return作用域
摘要:return在方法中至终止当前方法的执行,方法外后面的代码继续执行,有时小粗心就忘记这个。
阅读全文
Response.AddHeader使用实例收集
摘要:文件下载,指定默认名srxljlResponse.AddHeader("content-type","application/x-msdownload");Response.AddHeader("Content-Disposition","attachment;filename=要下载的文件名.rar");刷新页面srxljlResponse.AddHeader “REFRESH”, ”60;URL=newpath/newpage.asp” 这等同于客户机端<META>元素: <META HTTP
阅读全文
Response.Redirect异常处理报错
摘要:response.redirect放在try块里面报中止线程错误 2010-8-15 20:41:29 上传者: 飞火兰博 点击率:127System.Threading.ThreadAbortException,原因如下: Response.End 方法停止页的执行,并将该执行变换到应用程序的事件管线中的 Application_EndRequest 事件。 Response.End 后面的代码行将不执行。 此问题出现在 Response.Redirect 和 Server.Transfer 方法中,这是由于这两种方法都在内部调用 Response.End。 解决方案 若要解决此问...
阅读全文