(function(){ var mouseX = 0; var mouseY = 0; //定义一个全局toaslist用来存在新建的吐司 var toastLsit = []; window.Toast = function(content,duration,positon) { return new Toast(content,duration,positon); } function Toast(c…
<script type="text/javascript"> var ua = navigator.userAgent.toLowerCase(); if (/iphone|ipad|ipod/.test(ua)) { //alert("iphone"); } else if (/android/.test(ua)) { var alertmessage="温馨提示:您可以在右下角的菜单中下载最新版本的手机版APP哦!\n \n本提示只出现一…
转自:http://hi.baidu.com/ittdt/item/d932cf37f486f886c3cf29ea new AlertDialog.Builder(MainEngine.context) //.setTitle("提示") .setMessage("确定要退出游戏吗?") .setPositiveButton("确定", new DialogInterface.OnClickListener() { @…
1.工厂方式 <script type="text/javascript"> function createObject(name){ var p = new Object(); p.name=name; p.say = function(){alert(p.name+'ff');} return p; } var p1 = createObject("p1"); var p2 = createObject("p2"); alert(…