Jquery外掛程式placeholder的使用方法,jqueryplaceholder
閑的蛋疼,示範一下Jquery外掛程式placeholder的使用方法,藉助該外掛程式可以輕鬆實現HTML5中placeholder特效:
:
實現代碼:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <title>藉助jquery placeholder實現HTML5中placeholder特效</title> <script type="text/javascript" src="<%=basePath%>js/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="<%=basePath%>js/jquery.placeholder.js"></script><script type="text/javascript">$(function() {$('input, textarea').placeholder();});</script><style type="text/css">input, textarea { font-family: Helvetica, Arial; color: #000;}.placeholder {color: #aaa;}</style></head> <body><center style="margin-top: 10%"><font style="font-size: 18pt; font-weight: bold;font-weight: bold; color: red;">藉助jquery placeholder實現HTML5中placeholder特效</font></center><br><br> <input type="text" id="userName" name="userName" placeholder="請輸入使用者名稱…" style="margin-bottom: 12px;"><br> <input type="password" id="password" name="password" placeholder="請輸入密碼…" style="margin-bottom: 12px;"><br> <textarea id="personalInformation" name="personalInformation" rows="3" cols="50" maxlength="200" placeholder="請輸入個人資訊…"></textarea></body></html>
說明:上面例子中使用了jquery-1.8.3.min.js和jquery.placeholder.js兩個檔案,這兩個檔案可在下面的下載資源中找到。
【0分下載資源】
jquery 外掛程式怎使用?
把外掛程式下載下來 然後一般外掛程式的網站都有 demo 和使用方法 你看一下使用方法 就行 看不懂的話 去Google翻譯 翻譯一下
然後先把外掛程式引入 方法一般作者都有表述 和 講解
教Jquery外掛程式的使用方法
<html><head><link rel="stylesheet" href="/timelinexml.css"><script src="/timelinexml.js"></script><script> $(’#my-timeline’).timelinexml({ src : ‘timeline.xml’ });</script></head><body><div id=”my-timeline”></div> </body></html>