在jsp中的js代码 function disSelectedOldKey(){
//判断说明:oldSelectedKeyIndex!=selectedKeyIndex
// 当只有一个相似关键字的时候,则不存在上一次选中和这次选中关键字,
// 只要第一次选中后,按向上或向下箭头都是选中。
if (oldSelectedKeyIndex!=-1&&oldSelectedKeyIndex!=selectedKeyIndex){
$('keyId'+ oldSelectedKeyIndex).bgColor=unselectedBgColor;
}
// 上一次选中项更新
oldSelectedKeyIndex = selectedKeyIndex;
}火狐提示说 $is not defined大侠指教啊
//判断说明:oldSelectedKeyIndex!=selectedKeyIndex
// 当只有一个相似关键字的时候,则不存在上一次选中和这次选中关键字,
// 只要第一次选中后,按向上或向下箭头都是选中。
if (oldSelectedKeyIndex!=-1&&oldSelectedKeyIndex!=selectedKeyIndex){
$('keyId'+ oldSelectedKeyIndex).bgColor=unselectedBgColor;
}
// 上一次选中项更新
oldSelectedKeyIndex = selectedKeyIndex;
}火狐提示说 $is not defined大侠指教啊
主要是这句的问题吧?
$('keyId'+ oldSelectedKeyIndex).bgColor=unselectedBgColor; $这个你定义了吗?还是导入的jquery?
加上这个试试``
这个效果是用jquery实现的吗?要是的话,就导入jquery要不是就去你找到这个代码的网站,去看看是不是少粘什么东西了