function getUrlString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return decodeURI(r[2]); return null;}
用于创建菜单的常用的方法有如下两种: 1.onCreateOptionsMenu(Menu menu) 2.onPrepareOptionsMenu(Menu menu) MyDiaryActivity中的方法: /** * Initialize the contents of the Activity's standard options menu. * You should place your menu items in to menu. */ public boolean onCreat