当前位置:首页 > jQuery禁用input

jquery设置input不可编辑,禁用jQuery中的input元素,设置不可编辑的方法

wzgly1周前 (08-20)1
jquery设置input不可编辑,禁用jQuery中的input元素,设置不可编辑的方法
要使用jQuery设置input元素不可编辑,可以通过添加readonly属性或禁用该元素来实现,以下是一种方法:,``javascript,$(document).ready(function() {, $('#yourInputId').attr('readonly', 'readonly...