Parameters
- script
Type: System.String
A string expression with javascript.
Return Value
Type: System.String
The result of the script execution.
The following code example demonstrates uses of the EvaluateScript method.
C# | Copy Code |
---|---|
public static int Execute(Instance instance) { Tab tab = instance.MainTab; if ((tab.IsVoid) || (tab.IsNull)) return -1; if (tab.IsBusy) tab.WaitDownloading(); return tab.MainDocument.EvaluateScript("document.write(1)"); } |
PHP | Copy Code |
---|---|
public static function Execute($instance) { $tab = $instance->MainTab; if (($tab->IsVoid) || ($tab->IsNull)) return -1; if ($tab.IsBusy) $tab->WaitDownloading(); return $tab->MainDocument->EvaluateScript("document.write(1)"); } |
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family