javascript 实现分页条
function Paging(pageNum,pageSize,totalCount,skipCount,fuctionName,currentStyleName,currentUseLink,preText,nextText,firstText,lastText)
{
//debugger;
var returnValue = "";
var begin = 1;
var end = 1;
var totalpage = Math.floor(totalCount / pageSize);
if(totalCount % pageSize >0)
{
totalpage ++;
}
if(preText == null)
{
firstText = "prev";
}
if(nextText == null)
{
nextText = "next";
}
begin = pageNum - skipCount;
end = pageNum + skipCount;
if(begin <= 0)
{
end = end - begin +1;
begin = 1;
}
if(end > totalpage)
{
end = totalpage;
}
for(count = begin;count <= end;count ++)
{
if(currentUseLink)
{
if(count == pageNum)
{
returnValue += "<a class=\""+currentStyleName+"\" href=\"javascript:void(0);\" onclick=\""+fuctionName+"("+count.toString()+");\">"+co
相关文档:
出处:http://www.jcwcn.com/article/2005/1210/javascript_17476.html
<HTML>
<HEAD>
<title>WEB页面导出为EXCEL文档的方法
</title>
</HEAD>
<body>
<BR>
<table id = "PrintA" width="100%" border="1" cell ......
问:
Hi,
I have this C#/ASP.NET/.aspx page with a string variable named myString with the value "Mario Gamito".
How can I access "Mario Gamito" from within a JavaScript function, i. e., the variable's value ?
Already tried '" + mystring + "' but it doesn't works.
Any help would be appreciated.
......
1.如何在javascript访问C#变量
方法一:使用<%=%>
<input id="Button3" type="button" value="js调用c#变量" onclick="return Button3_onclick()" />
function Button3_onclick()
{
alert('我的名字:'+ '<%=name %>'); ......