用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>
相关文档:
//设置当前页面为用户的首页
function setHomepage()
{
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage(window.location.href);
event.returnValue=false;
return;
}
//加入收藏
function addFavorite()
{
&nb ......
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用法
2009-04-21 22:52
<html>
<head>
<script language="javascript">
function Test(){
var str="";
str+="Hello,";
str+="This ......
源码:
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 ......
function
clone(jsonObj) {
var
buf;
if
(jsonObj
instanceof
Array) {
buf = [];
......