JK Web Studio

Specializing in efficient and user friendly web design solutions

info@jkwebstudio.com

Passing a function call as a JSON parameter

	<script language="javascript">

		function f(o){
			if (o.f){
				o.f;
			}
		}

		function f2(a, b){
			alert(a+","+b);
		}

		var args = {a:1, b:2, c:3, f:f2(1,2)};

		f(args);

	</script>

Leave a Reply