小仙女-jquery 、ajax、jsp基础
来源:互联网 发布:帝国cms 火车头采集 编辑:程序博客网 时间:2024/04/27 15:23
jquery 、ajax、jsp基础
1、在JQuery能获取就能设置(对象设置)
function test1(){alert("11");var username = $("#username").val();alert("11"+username);username="Tom1";alert("22"+$("#username").val());alert("33"+username);$("#username").val("Tom2");alert("44"+username);$("#username").val("");alert("55"+username);}2、removeArrt用法
function test2(){$("#picture").removeArrt("src");}3、attr用法
function test3(){alert($("#username").attr("type"));alert($("#username").attr("type","buton"));alert($("#username").attr("value"));}4、设置字体样式
function test4(){alert($("#username").css("color");}5点击事件
$(document).ready(function(){$("#but1").click( function () {alert("11111"); }); });6、聚焦、失焦事件
$(document).ready(function(){ $("input").focus(function(){ $("input").css("background-color","#FFFFCC"); }); $("input").blur(function(){ $("input").css("background-color","#D6D6FF"); });});
7、select事件
$(document).ready(function(){ $("input").select(function(){ $("input").after(" Text marked!"); });
8、keypress回车事件
//回车$(document).ready(function(){$('#login').keypress(function(e){if(e.keyCode==13){alert("你点击了回车事件");}});});9、append 事件
$(document).ready(function(){ $("button").click(function(){ $("p").append(" <b>Hello world!</b>"); });});
$(document).ready(function(){ $("#app1").click(function(){ $("<b> Hello World!</b>").appendTo("#pp"); });});<body><p id="pp">I would like to say: </p><input type="button" value="点我6" id="app1"/></body>
function test5(){alert($("li:first").text());}
$(document).ready(function(){ $("li:first").css("background-color","#B2E0FF");});
function test6(){alert($("input:not(:checked)"));}
$(document).ready(function(){ $(".btn1").click(function(){ $(":checked").hide(); });});
function test7(){alert($("tr:eq(1)"));}
13、checked事件
function test8(){alert($("input[name='newsletter']").attr("checked", true));}function test9(){alert($("div").children(".selected"));}
14、JSP中这样写才正确
{param.password1==param.password2}
15、jsp
jsp页面实际上是servlet
jsp中可以使用request和session
jsp和servlet优缺点
优 方便显示
jsp
缺 不方便出来业务逻辑
优 方便出来业务逻辑
servlet
缺 不方便显示
jsp页面运行原理
阅读全文
0 0
- 小仙女-jquery 、ajax、jsp基础
- 小仙女-Jquery基础
- 小仙女-mybatis基础
- 小仙女-js基础精华
- 小仙女—快速入门javescript基础
- 天生丽质小仙女java实训笔记基础00
- 小仙女 html、css、js基础Java实训05
- 天生丽质小仙女 jdbc servlet基础用法下
- 小仙女大梦想
- 小仙女是谁???
- Hiberinate+json+jsp+jquery+ajax+mysql小项目
- jquery/ajax in jsp
- jsp+ajax+jquery
- jQuery基础---Ajax基础
- jquery+ajax小例子。
- 小仙女发展副业!!!python爬虫
- 小仙女 快速学会登陆注册
- 小仙女-javascript快速入门下
- readonly与const的区别
- 半同步复制
- 【时间管理】柳比歇夫之奇特的一生
- javaweb开发环境配置完全手册
- Android ContentProvider(内容提供者 )+ContentResolver(内容访问者)
- 小仙女-jquery 、ajax、jsp基础
- day1 JavaScript Drum Kit 中文指南
- 响应式网页
- std::endl 有什么作用
- CodeForces
- Section 2.1 holstein
- 实训--day08struts
- python3字符串
- Java实践(四)---java.lang.Math