1
我想发送href值。但它不起作用。发送变量fancybox onclick事件
function display() {
$.fancybox({
'href': 'index.php',
'width' : '75%',
'height' : '75%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
}
我tryed这一点:
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>
的innerHTML这里面onclick事件所以它不是与工作“削减
为什么
这onclick事件里面的innerhtml所以它不与'斜杠 – 2010-04-27 01:35:14
@samuel一起工作 - 我没有跟着你,你能说不同的话吗?我会在我的答案中使用第二种方法,但是如果您必须可以使用'\''或'\'''''''作为斜杠,那么您可以在字符串中使用引号。 – 2010-04-27 01:36:48
谢谢。谢谢 – 2010-04-27 01:39:29