seam中實現jQuery 與rich:jquery
Mrpublic
2009-03-20
有沒有不用自己再寫腳本語言或者類。來實現表單提交的取消,
<s:button propagation="end" value="取消"/> 好像可以,但我覺得這樣用不對耶, 呵呵 還是有其它自帶的方法實現,,,, 難道還是規規矩矩地寫腳本語言 |
|
Mrpublic
2009-03-20
![]() 要在seam里的js里實現反選? <style type="text/javascript"> function revCheck() { for (var i=0;i<form1.elements.length;i++) { var e=form1.elements[i]; if (e.id=='cx') e.checked=!e.checked; } } </style> 這樣寫肯定是有毛病的 怎么改呀 #{form1.elements.length}?? |
|
andyhan
2009-03-20
why not jQuery?
|
|
Mrpublic
2009-03-21
pls give me an example about how it works out my problem.. goodman.
Does it was well supported in seam ?? |
|
Mrpublic
2009-03-21
<script type="text/javascript">
function rcheckboxall(){ $("input[@type='checkbox']").each(function(){ if($(this).attr("checked")){ $(this).attr("checked",false); }else{ $(this).attr("checked",true); } }); } </script> 在seam中 <h:selectBooleanCheckbox/>等都沒有type屬性呀?? |
|
无双Rama
2009-03-22
Mrpublic 写道 <script type="text/javascript">
function rcheckboxall(){ $("input[@type='checkbox']").each(function(){ if($(this).attr("checked")){ $(this).attr("checked",false); }else{ $(this).attr("checked",true); } }); } </script> 在seam中 <h:selectBooleanCheckbox/>等都沒有type屬性呀?? 你这么问是什么意思?它的type属性能调用你写的js吗? |
|
andyhan
2009-03-23
jQuery是运行在浏览器的,它select的对象是html。
|