KTooltip 工具提示组件

发布一个小工具KTooltip 。这是0.9beta版,出发日期紧,来不及全面检查。兄弟们如发现问题请反馈给我。1.0版发布源码。

演示和下载:http://ktooltip.kingda.org/

使用文档:http://ktooltip.kingda.org/docs/

阅读更多

AJAX创建工具提示问题

07-10

1。<-- this 是传的什么呢? -->rn2 。 offset += field[attr]; //[color=#FF0000] []是表示数组吗? 这个函数是干什么的[/color]rnrnrntoolTip.htmlrnrnrnrn rn Ajax Tooltiprn rn rn rn Ajax Tooltip Examplern Golf Coursesrn rn rn Augusta National [color=#FF0000]<-- this 是传的什么呢? -->[/color]rn Pinehurst No. 2rn St. Andrews Linksrn Baltusrol Golf Clubrn rn rn rn rn rn rn rnrn rnrnrn————————————————————————————————————————rnToolTipServlet.javarn/*rn * ToolTipServlet.javarn *rn * Created on June 30, 2005, 8:29 PMrn */rnrnpackage ajaxbook.chap4;rnrnimport java.io.*;rnimport java.util.HashMap;rnimport java.util.Map;rnrnimport javax.servlet.*;rnimport javax.servlet.http.*;rnrn/**rn *rn * @author natern * @versionrn */rnpublic class ToolTipServlet extends HttpServlet rn rn private Map courses = new HashMap();rnrn public void init(ServletConfig config) throws ServletException rn CourseData augusta = new CourseData(72, 7290);rn CourseData pinehurst = new CourseData(70, 7214);rn CourseData standrews = new CourseData(72, 6566);rn CourseData baltusrol = new CourseData(70, 7392);rn courses.put(new Integer(1), augusta);rn courses.put(new Integer(2), pinehurst);rn courses.put(new Integer(3), standrews);rn courses.put(new Integer(4), baltusrol);rn rn rn /** Handles the HTTP GET method.rn * @param request servlet requestrn * @param response servlet responsern */rn protected void doGet(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn Integer key = Integer.valueOf(request.getParameter("key"));rn CourseData data = (CourseData) courses.get(key);rn rn PrintWriter out = response.getWriter();rnrn response.setContentType("text/xml");rn response.setHeader("Cache-Control", "no-cache");rnrn out.println("");rn out.println("" + data.getPar() + "");rn out.println("" + data.getLength() + "");rn out.println("");rn out.close();rn rn rn /** Handles the HTTP POST method.rn * @param request servlet requestrn * @param response servlet responsern */rn protected void doPost(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn doGet(request, response);rn rn rn /** Returns a short description of the servlet.rn */rn public String getServletInfo() rn return "Short description";rn rn rn private class CourseData rn private int par;rn private int length;rn rn public CourseData(int par, int length) rn this.par = par;rn this.length = length;rn rn rn public int getPar() rn return this.par;rn rn rn public int getLength() rn return this.length;rn rn rnrn

没有更多推荐了,返回首页