我正在使用流星,所以有人可能會建議我可以在模板顯示(未加載)後處理的事件...?例如,我有一個顯示模式彈出窗口的模板。現在我想在模板「顯示」(未加載)後執行某些操作。請建議我如何處理相應的事件。 我都試過了,模板加載事件
<template name = "SendMessage">
//modal popup code
{{check}}
</template>
Template.SendMessage.check = function(){
alert("load");
};
請看看http://stackoverflow.com/questions/10109788/callback-after-the-dom-was-updated-in-meteor-js。它對你有用嗎? – 2012-08-09 02:21:36