html代码
<input type="text" name="search_val" placeholder="请输入课程名称搜索" class="layui-input search_val">
jquer语法
$('.search_val').on('input propertychange',function(){
var search_val=$('.search_val').val();
console.log(search_val)
})
<input type="text" name="search_val" placeholder="请输入课程名称搜索" class="layui-input search_val">
$('.search_val').on('input propertychange',function(){
var search_val=$('.search_val').val();
console.log(search_val)
})