62,268
社区成员
发帖
与我相关
我的任务
分享
//简码输入框内容改变检测
$("#t1 input").bind("keyup cut drop change", function(e) {
var id = $(this).attr("id");
if (id == 'TxtPy ') {
if ($(this).val() != "") {
.... //执行填充选择商品图层数据的方法
}
}
});
$(document).ready(function() {
//显示选择商品的层,
//t1为下半页的表格id
//SelectDIV的这个图层的ID
//TxtPy 为简码输入框的ID,注意你的简码输入框应该是有多个的.
$("#t1 input").bind("focus mousemove mouseout", function(e) {
var id = $(this).attr("id");
if (id == 'TxtPy') {
var topVal = ($(this).offset().top + 24) + "px";
var leftVal = $(this).offset().left + "px";
$('#SelectDIV').css({ left: leftVal, top: topVal }).fadeIn('slow'); //显示选择商品的图层
} else if (id !== "SelectDIV") {
$('#SelectDIV').fadeOut('normal');
}
});
});
//当点击图层中的商品名(或者表格行时)时,用AJAX取数据,填充一下本行的其它文本框值,如单价等;