adsense


Thursday, 12 November 2015

ADVANCE VB SCRIPT REMOVE METHOD PAGE 116

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button




ADVANCE VB SCRIPT REMOVE METHOD





Remove Method 


object.Remove(key)  
Parameter Description 

• Object, a Mandatory Parameter. This represents the name of the Dictionary Object. 

 

• Key, a Mandatory Parameter. This represents the key value pair 
that needs to be removed from the Dictionary Object. 

Example 
<!DOCTYPE html> 
<html> 
<body> 
<script language="vbscript" type="text/vbscript"> 
 
   Dim obj_datadict   ' Create a variable. 
   Set obj_datadict = CreateObject("Scripting.Dictionary") 
   obj_datadict.Add "a", "Apple"   ' Add some keys and items. 
   obj_datadict.Add "b", "Bluetooth" 
   obj_datadict.Add "c", "C++" 
   a=obj_datadict.Keys 
    
   msgbox a(0) 
   msgbox a(2) 
 
   obj_datadict.remove("b")  'The key value pair of "b" is removed' 
    
</script> 
</body> 
</html> 
Save the file as .HTML, and upon executing the above script in IE, 
it displays the following message in a message box. 
a 
c 


No comments: