获取应用存储区中保存的键值对的个数 var foo = plus.storage.getLength(); 参数: 无 返回值: Number : 键值对的个数 示例: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Storage Example</title> <script type="text/javascript"> // H5 plus事件处理 function plusReady(){ } do...
InstanceObject plus.android.runtimeMainActivity(); 说明: Android平台完整Java类名为android.app.Activity,完整API请参考Android开发文档android.app.Activity 参数: 无 返回值: InstanceObject : 程序原生Java层主Activity实例对象。 示例: <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <meta name=...
function Object plusGetAttribute( String name ); function Object plusSetAttribute( String name, Object value ); // ... } 说明: Java实例对象,可通过其方法来操作实例的变量和方法。 注意:必须通过plusGetAttribute()方法读取实例对象的属性值,通过plusSetAttribute()方法设置实例对象的属性值。 方法: plusGetAt...
扩展API加载完成事件 document.addEventListener( "plusready", plusreadyCallback, capture ); 说明: String 类型 为了保证扩展API的有效调用,所有应用页面都会用到的重要事件。 应用页面显示时需要首先加载扩展和API代码库,当扩展API代码库加载完成时会触发pluseready事件,当设备触发该事件后,用户就可以安全的调用扩展AP...
HTML5+APIReference net XMLHttpRequest模块管理网络请求,与标准HTML中的XMLHttpRequest用途一致,差别在于前者可以进行跨域访问。通过plus.net可获取网络请求管理对象。 对象: XMLHttpRequest: 跨域网络请求对象 ProgressEvent: HTTP请求进度事件 回调方法: XhrStateChangeCallback: 网络请求状态变化的回调函数 XhrProgressEvent...
HTML5 API ReferenceThis chapter provides a detailed reference for all of the new HTML5 JavaScript APIs. For a detailed discussion of these APIs, including examples and support level at time of press, see Chapter 3.doi:10.1007/978-1-4302-6368-5_8Jonathan Reid...
Returns: Type void attachTab(newPanel) Attach a tab/content pair to the Drawer Parameters: NameTypeDescription newPanelOM.control.DrawerPanel The drawer panel to be added Returns: Type void getID() Returns the ID generated for the tab
First, I grab a reference to the canvas using the “myCanvas” ID, and then get the canvas’s context which provides methods/properties for drawing and manipulating graphics on the canvas. I specified “2d” to use a 2-dimensional context to draw on the page....
使用新的標記、 CSS 功能和 JavaScript Api,為何可以在網路上的範圍由 leaps 和 bounds 成長。加入的瀏覽器廠商之間穩定的 one-upmanship,並幾乎每天都會展開令人興奮的功能清單。從開發人員以每晚組建釋放通道,並一般的平台預覽,快速變更瀏覽器和所有的 Web 開發人員將 exhilarating...
Parameters: NameTypeDescription filter1 OM.filter.Filter An instance of OM.filter.Filter filter2 OM.filter.Filter An instance of OM.filter.Filter Returns: An instance of OM.filter.And Type OM.filter.And Extends OM.filter.Filter Class...