1
Je souhaite envoyer une valeur href. mais ça ne marche pas.envoyer un événement variable fancybox onclick
function display() {
$.fancybox({
'href': 'index.php',
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
}
ı tryed ceci:
function display (who) {
$.fancybox({
'href': 'index.php'+who,
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
}
<a onclick="javascript:display("?id=11");" href="#" >create</a>
cet événement onclick à l'intérieur du innerHTML si sa ne fonctionne pas avec 'slash
pourquoi
cet événement onclick à l'intérieur du innerhtml donc ça ne fonctionne pas avec 'slash –
@samuel - Je ne vous suis pas là, pouvez-vous l'exprimer différemment? J'utiliserais la seconde méthode dans ma réponse, mais si vous devez vous échapper d'une barre oblique, comme ceci \ ou '\" ', alors vous pouvez utiliser des guillemets dans une chaîne –
Merci –