假设我有一个这样的字符串
var methodString = "<script>
var a;
var b;
function func1(v1, v2)
{
..///DO random stuff
}
</script>";
然后,在页面某处单击按钮后,我将此代码附加到正文的末尾
$(body).append(methodString);
如何调用我刚刚附加的这个新函数
$("button1").click(function() { func1(a,b); }); //This doesn't seem to recognize the new method.