We would like to know how to execute array string as Javascript method.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
<!-- ww w . jav a 2 s . c om-->
var obj = {
clearSearch: function () {
document.writeln('Search cleared');
}
};
obj['clearSearch']();
</script>
</head>
<body>
</body>
</html>
The code above is rendered as follows: