如何在javascript中调用函数 [英] how call a function in javascript
问题描述
你好
1-i有一个页面包含一个js文件调用'Clock.js'
hello
1-i have a page that include a js file call 'Clock.js'
<script type="text/javascript" src="js/Clock.js"></script>
此脚本有一个函数调用'showdate ()';
2 - 在我的页面中有另一个具有如下代码的函数:
this script has a func call 'showdate()' ;
2-in my page there is another func that has a Code like this :
image_path :'',slides : [ {image:'picture/1.jpg', title:'String',thumb:''}
i在下面的代码中用(**)指出:
------------------------------ --------------------------------------------------
i pointed it by (**) in Code below:
--------------------------------------------------------------------------------
<script type = "text/javascript">
jQuery(function () {
jQuery.supersized({
//Functionality
progress_bar : 1, // Timer for each slide
mouse_scrub : 0,
slide_links : 'blank', // Individual links for each slide (Options: false, 'number', 'name', 'blank')
start_slide : 0 , //Start slide (0 is random)
slide_interval : 4000 ,
transition : 1 ,
transition_speed : 1000 ,
keyboard_nav : true ,
performance : 2 ,
slide_counter : 0,
slide_captions : 0,
** image_path :'',slides : [ {image:'picture/1.jpg', title:"پنج شنبه - 07 فروردین 1393",thumb:''}
,{image:'picture/2.jpg',title:'Thursday - 27 March 2014',thumb:''}
,{image:'picture/3.jpg',title:'الخميس - 26 جمادی الأول 1435',thumb:''}]});
});
</script >
------- -------------------------------------------------- -----------------------
3-i想要将showdate()而不是String调用到该代码中。
它将是这样的:
--------------------------------------------------------------------------------
3-i want to call showdate() instead of String into that Code .
it will be like this:
image_path :'',slides : [ {image:'picture/1.jpg', title: showdate(),thumb:''}
ok
i测试它喜欢但它不起作用:
image_path:'',幻灯片:[{image:'picture / 1.jpg ',title:< Script> showdate()< / Script> ;, thumb:''}
我应该怎么做。
请帮助
ok
i test it like it but it does not work :
image_path :'',slides : [ {image:'picture/1.jpg', title:<Script> showdate()</Script>,thumb:''}
how Should i do that.
pls help
推荐答案
希望以下链接可以帮助您。
http:// stackoverflow。 com / questions / 19369470 / jquery-supersized-afteranimation [ ^ ]
http://stackoverflow.com / questions / 6478178 / calling-jquery-supersized-plugin-onclick [ ^ ]
Hope below link can help you.
http://stackoverflow.com/questions/19369470/jquery-supersized-afteranimation[^]
http://stackoverflow.com/questions/6478178/calling-jquery-supersized-plugin-onclick[^]
这篇关于如何在javascript中调用函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!