最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to call out javascript function which is assigned to a variable? - Stack Overflow

programmeradmin2浏览0评论
function test1 (){
    //do something
}

To call out the function above, i just need to write test1();

var check_day = function($select_d){
    //do something
};

How can I call out the function which is assigned to a variable?

function test1 (){
    //do something
}

To call out the function above, i just need to write test1();

var check_day = function($select_d){
    //do something
};

How can I call out the function which is assigned to a variable?

Share Improve this question asked Jun 5, 2012 at 15:59 zac1987zac1987 2,7779 gold badges47 silver badges62 bronze badges 2
  • 1 Refer this link for other options devlicio.us/blogs/sergio_pereira/archive/2009/02/09/… – Ahamed Mustafa M Commented Jun 5, 2012 at 16:06
  • WOW. There are many ways that i never seen before. Thanks. – zac1987 Commented Jun 5, 2012 at 16:31
Add a comment  | 

1 Answer 1

Reset to default 20

The same way–call a function using parens ():

check_day(the_parameter);
发布评论

评论列表(0)

  1. 暂无评论