<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html>
<head>
<title>ÖØÁ¦²âÊÔ</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
var SHAKE_THRESHOLD = 999;
var last_update = 0;
var x, y, z, last_x, last_y, last_z;
if (window.DeviceMotionEvent) {
window.addEventListener('devicemotion',deviceMotionHandler, false);
}
function deviceMotionHandler(eventData) {
var acceleration =eventData.accelerationIncludingGravity;
var myDate = new Date();
var curTime = myDate.getTime();
if ((curTime - last_update)> 100) {
var diffTime = curTime -last_update;
last_update = curTime;
x = acceleration.x;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载