2011年8月9日
摘要: <html><head><title>select操作大全</title><meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="this is my page"><meta http-equiv="content-type" content="text/h 阅读全文
posted @ 2011-08-09 19:46 星^_^風 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 在jQuery的许多方法中,很多方法的参数可以传入一个JSON对象,比如Ajax方法的第二个参数。怎么将文本转化成JSON对象,需要注意以下问题:1)$.parseJSON方法返回的是一个字符串,而不是JSON对象。2)要将字符串转化成对象,很容易想起JS中的eval方法。事实上是可以的,不过需要加上括号。如var js="{\"PageIndex\":\"1\"}";var obj=eval("("+js+")");。不过使用eval,是不安全的,因为其可以编译任何js代码。3)下载一个JSO 阅读全文
posted @ 2011-08-09 19:41 星^_^風 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1. $("#select_id").change(function(){... }); //为select添加事件,当选择其中一项时触发2. $("#select_id").find("option:selected").text();//获取select选中的Text3. $("#select_id").val();//获取Select选中的Value4. $("#select_id ").get(0).selectedIndex;//获取Select选中的索引值5. $("#se 阅读全文
posted @ 2011-08-09 19:07 星^_^風 阅读(135) 评论(0) 推荐(0) 编辑
摘要: struts.xml配置文件<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"><struts> <!-- 默认的视图主题 --> <constant name=&q 阅读全文
posted @ 2011-08-09 19:03 星^_^風 阅读(124) 评论(0) 推荐(0) 编辑