Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 已禁用按钮,该按钮未嵌入帖子中_Javascript_Jquery_Button_Onclick - Fatal编程技术网

Javascript 已禁用按钮,该按钮未嵌入帖子中

Javascript 已禁用按钮,该按钮未嵌入帖子中,javascript,jquery,button,onclick,Javascript,Jquery,Button,Onclick,这是一个经过编辑的问题。我为没有说清楚而道歉 我有一个新闻页面,它将显示产品列表和一个按钮,用户可以点击该按钮查看可用的优惠券。我不知道该怎么做 <button id="coupon_id" type="submit" value="Coupon" class="buttonlink" onclick="parent.location='<?php echo 'receipt-singleview?id=' . $ea

这是一个经过编辑的问题。我为没有说清楚而道歉

我有一个新闻页面,它将显示产品列表和一个按钮,用户可以点击该按钮查看可用的优惠券。我不知道该怎么做

 <button id="coupon_id" type="submit" value="Coupon" class="buttonlink"
                                onclick="parent.location='<?php echo 'receipt-singleview?id=' . $eachData["couponId"]; ?>'">Coupon</button>

看起来您可以使用$().html方法设置所需的箭头

小提琴:


看起来可以使用$().html方法设置所需的箭头

小提琴:

像这样的?

$('.SeeMore2')。单击(函数(){
var$this=$(this);
$this.toggleClass('SeeMore2');
$this.toggleClass('SeeLess2');
});
。请参阅更多2.更少{
显示:无;
}
.SeeLess2.更多{
显示:无;
}

请参阅更多►;见下文▲

$('.SeeMore2')。单击(函数(){
var$this=$(this);
$this.toggleClass('SeeMore2');
$this.toggleClass('SeeLess2');
});
。请参阅更多2.更少{
显示:无;
}
.SeeLess2.更多{
显示:无;
}


请参阅更多►;见下文▲<script> if(!$('input').val()){ $('#coupon_id').hide(); } else { $('#coupon_id').show(); } </script>
    if($this.hasClass('SeeMore2')){
        $this.html('&#9654');           
    } else {
        $this.html('&#9660');
    }