首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >功能实现参数

功能实现参数
EN

Stack Overflow用户
提问于 2015-07-26 14:50:20
回答 1查看 42关注 0票数 0

你好,我创建了这个函数:

代码语言:javascript
复制
function addNewStaticTab(int)
{

    if (int === undefined) int = "int";

    $.addDynaTab({
        tabID : 'addstatictab',
        type : 'html',
        html : '<table class="fontStreet" width="100%"> <tr> <td align="left" class="td-label">Intitulé*</td> <td width="2%">&nbsp;</td> <td align="left" width="150"><input type="text" class="input-middle" required></td> <td> <figure onclick="makeCaptionAppear(\''+ int +'\');" style="position:relative; padding:0px; margin:0px;" ><img src="img/inter.png" id="buttonCriteresLeft"><figcaption class="figcaptionRoster2" id='+ int +' onMouseOut="makeCaptionDisappear(\''+ int +'\');">Aide:<br> Exemples d\'intitulés :<br>Projet, développement commercial, développement international, En création, prestataire, apporteur d\'affaires, recherche d\'emploi/opportunités, etc.</figcaption></figure> </td> </tr> </table><br>',
        params : {},
        tabTitle : 'NOUVELLE ACTIVITÉ'
    });
}

我希望每次调用这个函数时,参数int都会增加。

例如:

int1

int2

等等。

这也许很简单,但我没能找到我想要的。

编辑:

下面是调用该函数的按钮:<a class="new"><button name="addNewStaticTab" id="addNewStaticTab" value="Add New Static Tab" onClick="javascript:addNewStaticTab();" style="font-size:16px; background:none; border:0;"><b>+</b> </button></a>

和函数调用:$(document).ready(function() { //add static tabs $("#addstatictab").dynatabs({ tabBodyID : 'addstatictabbody', showCloseBtn : true, confirmDelete : true }); });

EN

回答 1

Stack Overflow用户

发布于 2015-07-26 15:22:17

我想我必须修改这一行:

代码语言:javascript
复制
<a class="new"><button name="addNewStaticTab" id="addNewStaticTab" value="Add New Static Tab" onClick="javascript:addNewStaticTab();" style="font-size:16px; background:none; border:0;"><b>+</b> </button></a>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31638343

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档