易截截图软件、单文件、免安装、纯绿色、仅160KB

用Fleaphp、JavaScript实现分页下拉框

<script type="text/javascript">
function fnOnPageChanged(page) {
 var url = '<?=url('ShowFront','Search',$Request);?>' + '&page=' + page;
 //alert(url);
 document.location.href = url;
 
}
</script>
 <select id="selectPage" onChange="fnOnPageChanged(value);"><option >请选择</option>
        <?php 
        for($i=0;$i<=10;$i++){
         
         $page1=$pager->nextPage+$i-6;
         $page2=$pager->nextPage+$i-5;
                 echo " <option value='$page1' >第".$page2."页</option>";
        }
                  ?>
                  </select>


相关文档:

JavaScript 设为主页与加入收藏

//设置当前页面为用户的首页
function setHomepage()
{
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage(window.location.href);
   event.returnValue=false;
   return;
}
//加入收藏
function addFavorite()
{
 &nb ......

Javascript中常用的经典技巧

Javascript中常用的经典技巧
 
1. oncontextmenu="window.event.returnValue=false"
将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table>
可用于Table
2. <body onselectstart="return false">
取消选取、防止复制
3. onpaste=&quo ......

javascript 中的innerHTML的用法

javascript中innerHtml用法
2009-04-21 22:52
<html>
<head>
<script language="javascript">
function Test(){
       var str="";
       str+="Hello,";
       str+="This ......

史上最牛X最简洁的Javascript图片缩放代码

源码:
function resize(img, width, height) {
 (img.width > img.height)
 ? ((img.height = Math.min(height, width * img.height/img.width)) || (img.width = Math.min(width, img.width)))
 : ((img.width = Math.min(width, height * img.width/img.height)) || (img.height = Math.min(hei ......

JavaScript 深度克隆 JSON 对象


function
 clone(jsonObj) {  
    var
 buf;  
    if
 (jsonObj 
instanceof
 Array) {  
        buf = [];  
    ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号