我div在同一个表格中有几个.我想要做的是禁用表单Tab中的一个中的键,div而不div以相同的形式禁用其他s中的选项卡.
示例表格:
我想创建一个CSS类,使输入字段是只读的.
这是我的尝试:
<style>
.enableInput input[readonly] {
color: #CB000F;
}
</style>
<script>
function changeCss()
{
$("#desg").addClass("enableInput input");
}
</script>
</head>
FirstName:<input type="text" name='fname' id='fname' onBlur="changeCss();">
Designation:<input type="text" name='desg' id='desg' value='Software Engr'>
</html>
Run Code Online (Sandbox Code Playgroud)