eval(obj) ; 該函數會將 obj 當做代碼去執行一遍
例子
<!DOCTYPE html PUBLIC "
<html xmlns="
<head>
<meta http
<script src="jquery
<title> eval 函數的使用 </title>
</head>
<script>
function but
var obj = $("#test");
alert(obj
eval (obj
}
</script>
<body>
<textarea id="test" cols="
var a =
var b =
var c = a + b;
alert(c);
</textarea>
<input type="button" id="but
</body>
</html>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20437.html