你好,我创建了这个函数:
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%"> </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 }); });
发布于 2015-07-26 15:22:17
我想我必须修改这一行:
<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>https://stackoverflow.com/questions/31638343
复制相似问题