日期:2014-05-16  浏览次数:20373 次

js点击一个摁钮,怎么触发2个事件,我只写了一个,代码已经贴出来,求帮助
<script language="javascript">

function more(id,subscript){
$('#jf_iask_s').css({
top:study.bodyTop() + 100,
left:(document.body.clientWidth-600)/2 + 120 + 'px',
});
$.post("Book-see.html",{id:id,subscript:subscript},
function(s){
if(s.status) {
$("#btn_img > img").attr('src','/shgao/show/correction_book?pic='+s.info.img[subscript]);
$('#btn_left_a').bind("oclick",more(id,parseInt(s.info.subscript)-1));
$('#btn_right_a').bind("oclick",more(id,parseInt(s.info.subscript)+1));
$('#jf_iask_s').fadeIn();
}else{
alert(s.info);
}
},"json");
};
</script>


------解决方案--------------------
JScript code

$("#btn_img > img").attr('src','/shgao/show/correction_book?pic='+s.info.img[subscript]);
$('#btn_left_a').bind("oclick",more(id,parseInt(s.info.subscript)-1));
$('#btn_right_a').bind("oclick",more(id,parseInt(s.info.subscript)+1));