第一个问题: 问题描述: 1. 定义form $form['test'] = array( '#type' => 'textfield', '#value' => '', '#required' => TRUE ); 2. 浏览器里面修改这个textfield的值为'test string' 3. httpwatch中看到修改的值'test string'被传递上来 4. 在服务器端的$form_state['values']['test'] 还是空值。 问题解决: $form['test'] = array( '#type' => 'tex...
by Givemefive - php文档中心 - 2009-02-03 12:00:31 阅读(1752) 回复(0)
jquery表单取值赋值的一些基本操作2008-12-25 03:17/*获得TEXT.AREATEXT的值*/ var textval = $("#text_id").attr("value"); //或者 var textval = $("#text_id").val(); /*获取单选按钮的值*/ var valradio = $("input[@type=radio][@checked]").val(); /*获取一组名为(items)的radio被选中项的值*/ var item = $('input[@name=items][@checked]').val(); /*获取复选框的值*/ var checkboxval = $("#chec...
Getting a form value with jquery To get a form value with jquery use the val() function. Let's say we have a form like this, using an id for each form element: one two three We can display an alert for the values of "foo" and "bar" as easily this: window.alert( $('#foo').val() ); window.alert( $('#bar').val() ); If we're using the name only and not specifying an id, the jquery to get t...
大家好。 我在做一个网页,用到了jquery库。我的页面的左面部分是固定的。所以当我在选城市的时候,只希望加载右边部分。不知谁能提供一些提示。网页信息可通过下面链接看到。 谢谢 http://picasaweb.google.com/lh/photo/y_GcrKTxHFstnb62COjRXw?feat=directlink [ 本帖最后由 cs221313 于 2009-6-5 03:38 编辑 ]
其实第一眼见到jquery我的感觉似乎是java的一个什么框架,或者是一个用于查询数据库的工具,反正是和java相关的。但是后来发现我错了,原来jQeury是javascript的一个封装。既然如此,那我还是应该看看的。通过jQeury,可以有效的简化javascript的开发,我们只需要直接调用现成的封装好的功能即可,这一点对于我等懒人还是不错的选择。闲话少提,现在以例子来说明问题吧。 1).下载jquery:在http://docs.jquery.com/Downlo...
$("#select1")[0].options(index).selected = true; //使第index个option选中 $("#select1")[0].options(3).text //取索引为3的option值 ----------------------------------------------------------------------------- select name="select_test" id="select_test"> option value="11111" selected>aaaaoption> option value="22222">bbbboption> option value="33333">ccccoption> select> 取“cccc”的方法 var a = $("#s...
最近在玩弄jquery/interface,很不错的Javascript库。是惊也是喜,原来写JS代码可以这样简单! 强大的$啊,虽然认识JQ是因为对prototype的一个小小误会,但感觉JQ更胜于prototype。 http://www.ahdong.com 你现在看到的页面的效果就是用jquery/interface实现的,许多代码是直接从DEMO里拷过来的,呵呵^_^ jquery官方- http://www.jquery.com interface官方- http://interface.eyecon.ro jquery中文- http://jquery.org.c...