我想将一些产品设置为"不可销售",删除"添加到购物车"按钮并添加指向联系表单的链接.
我正在寻找这个解决方案几周.搜索,我发现这篇文章:
但我不能让它发挥作用.有人可以帮我详细说明吗?
我在提交后使用功能clearForms重置我的表单:
<script>
function clearForms()
{
var i;
for (i = 0; (i < document.forms.length); i++) {
document.forms[i].reset();
}
}
</script>
Run Code Online (Sandbox Code Playgroud)
并将身体设置为:
<body onLoad="clearForms()" onUnload="clearForms()">
Run Code Online (Sandbox Code Playgroud)
但这种方法是从2006年开始的(http://www.boutell.com/newfaq/creating/clearform.html).有没有办法用jquery做到这一点?
谢谢!