国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > WEB開發 > 正文

17.5.刪除共享對象中的數據

2024-04-27 13:52:24
字體:
來源:轉載
供稿:網友
17.5.1. 問題
我想要從磁盤上清除一個共享對象或者從一個共享對象中刪除數據的一個指定位置。
17.5.2. 解決辦法
使用clear()方法來清除一個共享對象。使用delete 關鍵字來移出一個共享對象的data 屬性中的制定數據。
17.5.3. 討論
你需要簡單的呼叫一個SharedObject 的clear()方法來從你的文件系統中清除這個共享對象。
+展開
-ActionScript
// create an lso
private var lso : SharedObject = getLocal( "myLso" );
// create some sample data
private var sampleData : String = "data";
//assign some data to the lso
lso.data.sampleData = sampleData;
//flush to the file system
lso.flush();
//check the lso value
trace( lso.data.sampleData );
// delete the lso
lso.clear();
// should be "undefined"
trace( lso.data.sampleData );

使用delete 關鍵字來刪除本地共享對象(lso)中的一個指定數據元素,但是注意,這個不能把共享對象從文件系統中清除。
+展開
-ActionScript
// delete sampleData
delete lso.data.sampleData;
// trace( lso.data.sampleData )
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 海林市| 临沧市| 宁夏| 特克斯县| 会理县| 池州市| 黎平县| 斗六市| 临潭县| 吴堡县| 大冶市| 梅河口市| 唐山市| 达州市| 南漳县| 深泽县| 大同市| 大余县| 陆川县| 墨玉县| 如东县| 凤山县| 北票市| 准格尔旗| 婺源县| 古浪县| 藁城市| 历史| 星座| 信阳市| 西丰县| 淳化县| 永嘉县| 淳化县| 偏关县| 襄樊市| 绥中县| 博乐市| 郯城县| 长乐市| 稷山县|