我有以下代码(使用MVC5项目),我需要在两个不同的JS文件中使用它。最好的方法是什么?
$("#act").prop("disabled", "disabled");
$("form").change(function () {
$("#act").removeAttr("disabled");
$("#btn").prop("disabled", "disabled");
});
$("input").keyup(function () {
$("#act").removeAttr("disabled");
$("#btn").prop("disabled", "disabled");
});