在Activity,Service,Window中监听Home键和返回键的一些思考,如何把事件传递出来的做法! 其实像按键的监听,我相信很多人都很熟练了,我肯定也不会说这些基础的东西,所以,前期,还是一笔带过一下,我们重点说下后半部分吧 一.Activity监听返回键 这个其实大家都知道,首先我们要了解流程,你要屏蔽这个返回键,那你就要拿到这个返回键的事件了,所以我们要监听了,而在Activity中,有两种做法,首先,系统是提供了返回键的监听的 /** * 返回键监听 */ @Override…
In some rare cases, you need to ask user to refresh the browsser to update the version. Maybe because some secrity issues. As we have learnt so far. And code change will generate a new service work in the waiting list. Unitl the current service worke…
1.问题原因与解决办法 因为修改了MySQL临时文件的目录后,使用service mysqld restart重启MySQL出现如下错误: service: no such service mysqld 错误原因: 是因为我们在编译安装MySQL时没有将MySQL的控制脚本mysql.server拷贝到/etc/init.d/中. 解决办法: 将MySQL的安装目录下的support-files/mysql.server拷贝到/etc/init.d/中,并重命名为mysqld.拷贝命令如下: #…
redhat 7 [root@lk0 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service Failed to stop iptables.service: Unit iptables.service not loaded. [root@lk0 ~]# [root@lk0 ~]# service iptables status Redirecting to /bin/systemctl stat…
在编写前端页面的时候,我们时常需要对页面加载的状态进行判断,以便进行相应的操作. 比如在移动端,时常需要在页面完全加载完成之前,先显示一个loading的图标,等待页面完成加载完成后,才显示出真正要展现的页面元素.见代码1: <html> <head> <script src="http://code.jquery.com/jquery-1.8.0.min.js"></script> <script> function isL…
错误写法 , 主要是在 href="#"这里 <a href="#" id="send" onclick="return buttonClick();">发送</a> 脚本如下 if (data == "发送成功") { alert(data); window.location.href = window.location.href; } 正确的写法  href 后面跟一个 java…
今天总结一下js中几个对象的区别和用法: 首先来说说 parent.window与top.window的用法 "window.location.href"."location.href"是本页面跳转 "parent.location.href"是上一层页面跳转 "top.location.href"是最外层的页面跳转 举例说明: 如果A,B,C,D都是jsp,D是C的iframe,C是B的iframe,B是A的iframe,如…
window.parent针对iframe,window.opener针对window.open 父页面parent.jsp: <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//E…
window.location和window.open的区别 window.location = "http://www.baidu.com" 跳转后有后退功能 window.location.replace("http://www.baidu.com") 跳转后没有后退功能 window.open("http://www.baidu.com") 要新的窗口打开链接…
一.Iframe 篇 公共部分 //父对象得到子窗口的值 //ObjectID是窗口标识,ContentID是元素ID function GetValue(ObjectID,ContentID) { var IsIE = (navigator.appName == 'Microsoft Internet Explorer') if(IsIE) {//如果是IE alert(document.frames(ObjectID).document.getElementById(ContentID).i…