日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

popup java_PoPup

發(fā)布時間:2025/3/15 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 popup java_PoPup 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

我點擊頁面上一個按鈕,從瀏覽器右下角浮起一個小框。顯示一些信息,就像一些即時通信軟件來消息以后浮起個框,顯示消息的內容。

----------------------------------------------------------------------------------------------------------------------------

給你個js例子!稍微再改改!就可以了!

New Page 1

if (document.all)

document.write('

')

var sitems=new Array()

var sitemlinks=new Array()

//以下是菜單內容,自由設置;

sitems[0]="本站首頁"

sitems[1]="最新更新"

sitems[2]="夢想軟件"

sitems[3]="其它欄目"

sitems[4]="桌面壁紙"

sitems[5]="給我留言"

sitems[6]="下載特區(qū)"

sitems[7]="Email Me"

sitems[8]="我的簡介"

//菜單項目連接

sitemlinks[0]="http://www.happydrips.com"

sitemlinks[1]="http://www.abc.com"

sitemlinks[2]="http://abc.ab.com"

sitemlinks[3]="../index.htm"

sitemlinks[4]="../jsschool/index.htm"

sitemlinks[5]="../../../gsbook.htm"

sitemlinks[6]="../../../perl/index.htm"

sitemlinks[7]="mailto:yshot@263.net"

sitemlinks[8]="http://www.happydrips.com"

for (i=0;i<=sitems.length-1;i++)

document.write(''+sitems[i]+'
')

function regenerate()

{

window.location.reload()

}

function regenerate2()

{

if (document.layers)

setTimeout("window.οnresize=regenerate",400)

}

window.οnlοad=regenerate2

if (document.all)

{

document.write('

')

themenu=document.all.slidemenubar2.style

rightboundary=0

leftboundary=-150

}

else

{

themenu=document.layers.slidemenubar

rightboundary=150

leftboundary=10

}

function pull()

{

if (window.drawit)

clearInterval(drawit)

pullit=setInterval("pullengine()",50)

}

function draw()

{

clearInterval(pullit)

drawit=setInterval("drawengine()",50)

}

function pullengine()

{

if (document.all&&themenu.pixelLeft

themenu.pixelLeft+=5

else if(document.layers&&themenu.left

themenu.left+=5

else if (window.pullit)

clearInterval(pullit)

}

function drawengine()

{

if (document.all&&themenu.pixelLeft>leftboundary)

themenu.pixelLeft-=5

else if(document.layers&&themenu.left>leftboundary)

themenu.left-=5

else if (window.drawit)

clearInterval(drawit)

}

-----------------------------------------------------------------------------------------------------------------------------

考慮一個經(jīng)典+流行控件

ASP.NET Popup Control

http://www.codeproject.com/aspnet/asppopup.asp

-----------------------------------------------------------------------------------------------------------------------------

js

以下僅供參考

function InitMsgBox(hint)

{

len = 0;

titlePopup=window.createPopup();

var titlePopupBody = titlePopup.document.body;

titlePopupBody.style.border ="solid #ffffff 1px";

var titleContent = "";

titleContent = titleContent + "

titleContent = titleContent + "

提示信息";

titleContent = titleContent + "

" + hint +"";

solid #0C68CF\">";

titleContent = titleContent + "

";

titlePopupBody.innerHTML = titleContent;

ShowMsgBox();

}

function MsgBox()

{

len += 4;

if (len > 110)

{

window.clearInterval(tID);

}

else

{

//170固定了消息提示框的寬度

//???????????? titlePopup.show(document.body.clientWidth - 170, document.body.clientHeight - len, 170, len, top.document.body);

titlePopup.show(window.screen.width - 170, window.screen.height - len, 170, len, top.document.body);

}

}

var tID

function ShowMsgBox()

{

tID = window.setInterval("MsgBox()",10);

}

-----------------------------------------------------------------------------------------------------------------------------

下面是我們的項目中用到的,并且實現(xiàn)的pop窗口效果

this.RegisterClientScriptBlock("popWin", this.RegisterScript(this.AwageSource()));

======================================================================================

///檢測權限

public bool CheckP(string power)

{

Hashtable ht = (Hashtable)Session[SessionName.PERMIT];

return ht.Contains(power);

}

///得到數(shù)據(jù)源

public DataTable AwageSource()

{

using (ISystemable st = (ISystemable)BNFactory.SetBN(typeof(ISystemable)))

{

int empid = int.Parse(this.Session["eppid"].ToString());

int accountId = int.Parse(this.Session[SessionName.ACCOUNT_ID].ToString());

int deptid = 0;

bool isOverLack = this.CheckP("ChaoQueYuanTiXing");

bool isBirthDay = this.CheckP("ShengRiTiXing");

return st.WakeBySystem(empid, accountId, deptid, isOverLack, isBirthDay);

}

}

///

/// 生成腳本塊的方法

/// 感謝原先的作者,非常感謝!

///

///

/// string

/// zhanglei@hrbanlv.com

private string RegisterScript(DataTable awakeTable)

{

if (stopAwakeFlag.Value == "1")

{

return "";

}

StringBuilder sb = new StringBuilder();

//增加try..catch,使ie5中因不支持window.createPopup(),而不報錯

sb.Append("

sb.Append("try {" + System.Environment.NewLine);

sb.Append("var have = 1;" + System.Environment.NewLine);

sb.Append("var testid=0;" + System.Environment.NewLine);

sb.Append("var oldWin= window;" + System.Environment.NewLine);

sb.Append("var oPopup = window.createPopup();" + System.Environment.NewLine);

sb.Append("var opopupi = 0;" + System.Environment.NewLine);

sb.Append("var showttt=null;" + System.Environment.NewLine);

sb.Append("var oPopBody = oPopup.document.body;" + System.Environment.NewLine);

sb.Append("oPopBody.style.backgroundColor='transparent';" + System.Environment.NewLine);

sb.Append("oPopBody.style.border = 'none';" + System.Environment.NewLine);

//sb.Append("oPopBody.innerHTML=\"

");

=======================================================================

***** [ADDED BY DoItNow, 2005/8/27] 加入 選擇筐 控制是否 顯示提醒

-----------------------------------------------------------------------

//sb.Append("

不在提示");

//=======[ADDED END]=====================================================

//int tempAwakeCount= awakeTable.Rows.Count;

//sb.Append("
您有 "+tempAwakeCount +" 條未讀提醒: [詳細] ");

//for(int i=0;i

//{

//string tempNo= (i+1).ToString(); //frmbotton22

sb.Append("
"+ ""+ tempNo+"."+ awakeTable.Rows[i]["awakeTitle"] +"");

//sb.Append("
"+ ""+ tempNo+"."+ awakeTable.Rows[i]["2"] +"");

//}

//

//sb.Append("

\";");

-----------------------------------------------------------------------------------------------------------------------------

與50位技術專家面對面20年技術見證,附贈技術全景圖

總結

以上是生活随笔為你收集整理的popup java_PoPup的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。