摘要: 今日写页面的时候需要用到字符串比较来设定input的状态,大概代码如下:$("div.room_center_hd").delegate("input","focus",function(){ if(/搜索多功能厅/.exec($(this).val())){ $(this).val("").css("color","black"); }}).delegate("input","blur",function(){ if(/^\s*$/. 阅读全文