Eclipse 支持jQuery 自动提示
1.Eclipse安装 spket 插件。(两 种方式):
在线安装:Help->Install New Software...->Add...->Name:"Spket",Location:http://www.spket.com/update/下载完毕重启 Eclipse 。
手动安装:到
http://www.spket.com/download.html下载 Plugin 版本,当前版本为1.6.17。下载解压后直接放置于Eclipse的dropins目录下,重启Eclipse.
2.下载jQuery文件,(要下载开发版本)。
3.设置spket。
Window -> Preferences -> Spket -> JavaScript Profiles -> New ; 输入“jQuery”点击OK; 选择“jQuery” 并点击“Add Library”然后在下拉条中选取“jQuery”; 选择 “jQuery”并点击“Add File”,然后选中你下载的jQuery.js 文件;设成Default;
4,设置js打开方式。
Window -> Preferences ->General-> Editors-> File Associations-> 选择*.js 将 Spket JavaScript Editor设为Default。
5,新建一个js文件,jQuery 自动提示!!
但不知道是为什么jQuery-1.4.3.js放到(File Associations)中js文本不给自动提示,藐似只有之前的版本文件才给提示
pageEncoding="utf-8"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
<html>
<head>
<script type="text/javascript"
src="jquery/jquery-1.4.3.js"></script>
<script language="javascript">
$(document).ready(function() {
$(".csstab tr").mouseover(function() { //当鼠标移到class为csstab的表格的tr上时,执行函数
$(this).addClass("over"); //给这行添加class值为over
}).mouseout(function() { //鼠标离开
$(this).removeClass("over"); // 撤销class值为over
});
$(".csstab tr:even").addClass("alt"); //表格为偶数行的添加class值为alt $("tr:even")所有偶数行 $("tr:odd")所有奇数行
});
</script>
<style type="text/css">
<!--
th {
background: #0066FF;
color: #FFFFFF;
line-height: 20px;
height: 30px;
}
td {
padding: 6px 100px;
border-bottom: 1px solid red;
vertical-align: top;
text-align: center;
}
td * {
padding: 6px 100px;
}
tr.alt td {
background: bule; /*这行将给所有的tr加上背景色*/
}
tr.over td {
background: red; /*这个将是鼠标高亮行的背景色*/
cursor: pointer;
}
-->
</style>
</head>
<table width="400" cellspacing="0" class="csstab" cellpadding="2" align="center">
<tr>
<th>姓名</th>
<th>年龄</th>
<th>性别</th>
<th>QQ</th>
</tr>
<tr>
<td>opper</td>
<td>23</td>
<td>男</td>
<td>56791700</td>
</tr>
<tr>
<td>opper</td>
<td>23</td>
<td>男</td>
<td>56791700</td>
</tr>
<tr>
<td>opper</td>
<td>23</td>
<td>男</td>
<td>56791700</td>
</tr>
<tr>
<td>opper</td>
<td>23</td>
<td>男</td>
<td>56791700</td>
</tr>
<tr>
<td>opper</td>
<td>23</td>
<td>男</td>
<td>56791700</td>
</tr>
<tr>
<td>opper</td>
<td>23</td>
<td>男</td>
<td>56791700</td>
</tr>
<tr>
<td colspan="4"> 分页</td>
</tr>
</table>
</html>
- 大小: 45.3 KB
分享到:
相关推荐
jquery实现隔行换色效果
1、步骤分析: 第一步:引入jquery的类库 第二步:直接写页面加载函数 第三步:直接使用jquery的选择器(组合选择)拿到需要操作的元素(奇数行和偶数行)...使用jQuery完成表格隔行换色</title> [removed][removed]
Jquery实现隔行换色特效代码是一款简单的表格隔行换色特效。
jquery实现表格多选,单击颜色加深,再点击颜色还原,隔行换色,自己写的插件
jQuery实现table表格鼠标经过隔行换颜色特效代码.zip
前端小白入门案例使用Hbuilder国产开发工具引用jQuery库实现表格隔行换色基本功能。简化DOM操作 代码的功能如下: 1.通过选择器获取表格的表头对象(thead tr),并设置其背景颜色为navajowhite。 2.通过选择器获取...
一些css的定义,可以根据需要自己选择。//显示单双行显示不同背景色【方法一】: // $... ”UL_id”> 单数</li> 双数</li> 双数</li> </ul> odd:单 even:双 jQuery 表格隔行变色代码li隔行换色改进版JS控制表格隔行变色
综合jquery实现表格隔行换色和鼠标经过提示效果源码 7)日历插件 1.jQuery简洁漂亮点阵数字时钟显示日期的插件 2.一款简单jQuery日历选择器代码 3.基于jquery实现倒计时钟插件下载,Flip-Down Clock特效效果 ...
通过jquery技术来操作表格是件简单的事,通过jquery的语法,可以很轻松的完成表格的隔行换色,悬浮高亮,在实际的应用中可能会出现表格中带复选框的,删除时,将复选框所在的行的记录删除。在这的地方,可以加个特效...
14.5 XML实现隔行变色的表格 第15章 CSS与Ajax的综合应用 15.1 Ajax概述 15.2 Ajax入门 15.3 Ajax实例:能够自由拖动布局区域的网页 第4部分 综合案例篇 第16章 我的博客 16.1 分析...