我想禁用提交按钮,直到选择一组单选按钮之一。我知道有类似的问题,但是没有一个是动态创建的单选按钮组.
这是我拥有的..。页面顶部的脚本在先前的视图中生成多个给定用户上传的按钮:
var jScriptArray = new Array(@ViewBag.ColNames.Length);
var array = @Html.Raw(Json.Encode(ViewBag.ColNames));
for( var i = 0; i < @ViewBag.ColNames.Length; i++ ) {
jScriptArray[i] = array[i];
}
var length
我试图在用户单击WooCommerce Add to cart按钮时禁用它,原因有二。
以防止多次单击它。
为了向用户显示他们的点击做了些什么
我使用了这个代码:
if ($('body').filter('.single-product')) {
var add_cart_button = $('.single_add_to_cart_button');
/* Disable button on add to bag click if button is active */
add_cart_but
尝试避免在submit按钮上多次提交,使用属性disabled单击,但单击它只会阻塞按钮,什么也不会发生。尝试将id添加到Html.Begin窗体,但单击它会出现服务器应用程序错误,如:the parameters dictionary contains a null entry for parameter 'id' of non-nullable type System.Int32
@using (Html.BeginForm(MVC.Controller.MethodName(), FormMethod.Post, new { id = "submitFormId&
我想使用我找到的复选框函数,但是在我现有的页面中,我使用了具有以下形式的引导按钮。
<p style="color: #FFFFFF">I have read and agree to the terms and conditions
<input type="checkbox" id="termsChkbx " onclick="change_button(this,'sub1')"/>
</p>
<a class="btn btn-light b