弹筐里同一个按钮判断是从哪里点击过来的form
点击弹框按钮
<form action="javascript:;" method="post">
<button type="submit" id="knowledge" class="submit btn confir next" style="margin-top: 18px;cursor: pointer;">知道了</button>
</form>
确认按钮
<button type="submit" class="submit btn confir a1" id="queren" onclick="document.getElementById('light').style.display='block'; document.getElementById('fade').style.display='block'" value="2">确认</button>
还款按钮
<a class='Singles a1' id="examine " value="1" onclick="document.getElementById('light').style.display='block'; document.getElementById('fade').style.display='block'" style="cursor: pointer;color: rgba(51,160,255,1);">查看还款明细</a>
点击还款按钮,确认按钮都进入同一个弹框,点击弹框按钮进入不同的页面
var value;
$(".a1").click(function(){
// 下面这行代码就是你要的ID属性
value = $(this).attr("value");
});
$("#knowledge").click(function(){
if(value == 1){
document.getElementById("form1").action="confirm.html";
$('#form1').submit();
}else if(value == 2){
document.getElementById("form1").action="succverified.html";
$('#form1').submit();
}
});