哪位同仁有比较好的outlook(QQ)类型的菜单源码,急用,在线等待 还有一些是别人帮忙改过的增加了图标、右键菜单、和大小图标变换并且类似outlook按钮效果,鼠标移动过去的风格 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 to fhfpku(其实我是卧底)已经收到,只是感觉在item的地方想加些其他东东不很容易,还有没有其他能满足在item位置上随意放其他东西的菜单 http://www.csdn.net/expert/topic/498/498530.xml?temp=.5478784 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> <HEAD> <TITLE>Outlook ToolBar</TITLE> <META http-equiv="Content-Type" content="text/html; charset=gb2312"> <META content="MSHTML 6.00.2600.0" name="GENERATOR"> <STYLE type="text/css">BODY { FONT-WEIGHT: normal; FONT-SIZE: 11pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal}.blue { COLOR: blue}.red { COLOR: red}INPUT { FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal}TD { FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal}</STYLE> <SCRIPT language="javascript"><!--//Size of buttons.var BTN_HEIGHT = 25;var BTN_WIDTH = 100;//Space between buttons.var BTN_SPACE =0;var ITM_HEIGHT = 80;var ITM_SPACE = 2;var ButtonCount = 0;var ItemCounts;var FocusButton;//reset postion of buttons and items, show clicked button's items, hide other items.function onBtnClick(btnIndex){ var i; var minHeight; var btmBtnTop; if ((btn < 0) || (btn >= ButtonCount)) return; document.body.scrollTop = 0; for(i=0; i<=btnIndex; i++) { var btn = document.all.item("BTN" + i); if (btn == null) alert("NULL BTN"); else btn.style.posTop = i * (BTN_HEIGHT + BTN_SPACE); }; //minimun height used by buttons and items. minHeight = ButtonCount * (BTN_HEIGHT + BTN_SPACE) - BTN_SPACE + ItemCounts[btnIndex] * (ITM_HEIGHT + ITM_SPACE); //calculate bottom button's start top position. if (minHeight > document.body.clientHeight) { document.body.setAttribute("SCROLL", "YES", false); btmBtnTop = (btnIndex+1) * (BTN_HEIGHT + BTN_SPACE) - BTN_SPACE + ItemCounts[btnIndex] * (ITM_HEIGHT + ITM_SPACE); } else { document.body.setAttribute("SCROLL", "NO", false); btmBtnTop = document.body.clientHeight - (ButtonCount - btnIndex -1) * (BTN_HEIGHT + BTN_SPACE); } for(i=btnIndex + 1; i<ButtonCount; i++) { var btn = document.all.item("BTN" + i); if (btn == null) alert("NULL BTN"); else btn.style.posTop = btmBtnTop; btmBtnTop += (BTN_HEIGHT + BTN_SPACE); }; var itmtop = (BTN_HEIGHT + BTN_SPACE) * (btnIndex + 1); for(i=0; i<ButtonCount; i++) for(j=0; j<ItemCounts[i]; j++) { var tbl = document.all.item("ITM" + i + "_" + j); if (null == tbl) continue; if (i == btnIndex) { tbl.style.posTop = itmtop + j * (ITM_HEIGHT + ITM_SPACE); tbl.style.visibility = "visible"; } else tbl.style.visibility = "hidden"; //tbl.style.display = "none"; } FocusButton = btnIndex;};function onResize(){ onBtnClick(FocusButton);}function constructmenu(){ var i,j; var str; str = ""; ItemCounts = new Array(); for(i=0; i<mytree.children.length; i++) { var item = mytree.children.item(i); str += '<INPUT TYPE="BUTTON" '+ 'ID="BTN' + i + '" '+ 'VALUE="' + item.getAttribute("VALUE") +'" ' + 'STYLE="position:absolute; HEIGHT: ' + BTN_HEIGHT + 'px; WIDTH: ' + BTN_WIDTH + 'px;" ' + 'ONCLICK="onBtnClick(' + i +');' + '">'; str += '\n<BR>'; ItemCounts[i] = 0; for(j=0; j < item.children.length; j++) { str += '<TABLE WIDTH=' + BTN_WIDTH + ' ID="ITM' + i + '_' + j + '" STYLE="position:absolute;">'; str += '<TR><TD ALIGN=CENTER>'; str += '<A HREF=' + item.children.item(j).getAttribute("HREF") + ' TARGET="CONTENTS">'; str += '<IMG SRC="' + item.children.item(j).getAttribute("IMGSRC") + '" ALIGN=CENTER STYLE="border:none;">'; str += '</A>'; str += '</TD></TR>'; str += '<TR><TD ALIGN=CENTER>'; str += item.children.item(j).getAttribute("VALUE"); str += '</TD></TR>'; str += '</TABLE>'; ItemCounts[i] ++; } ButtonCount ++; } menu.outerHTML = str; onBtnClick(0); //menu.innerText = str; FocusButton = 0; window.onresize = onResize;}//--></SCRIPT> </HEAD> <BODY leftMargin="0" onload="constructmenu()"> <UL id="mytree" style="DISPLAY: none"> <LI value="Mail"> <UL HREF="contents.htm" VALUE="InBox" IMGSRC="inbox.gif"> </UL> <UL HREF="contents.htm" VALUE="OutBox" IMGSRC="outbox.gif"> </UL> <UL HREF="contents.htm" VALUE="Sent" IMGSRC="sentitems.gif"> </UL> <UL HREF="contents.htm" VALUE="Deleted" IMGSRC="deleted.gif"> </UL> <LI value="Contacts"> <UL HREF="contents.htm" VALUE="Contacts" IMGSRC="contacts.gif"> </UL> <LI value="Other"> <UL HREF="contents.htm" VALUE="Journal" IMGSRC="journal.gif"> </UL> <UL HREF="contents.htm" VALUE="Tasks" IMGSRC="tasks.gif"> </UL> <UL HREF="contents.htm" VALUE="Notes" IMGSRC="notes.gif"> </UL> <UL HREF="contents.htm" VALUE="Calendar" IMGSRC="calendar.gif"> </UL> </LI> </UL> <DIV id="menu"></DIV> </BODY></HTML> 关于用javascript在框架编写自动填写表单的问题 火狐下居然打死也不显示 Request.Params问题_有高手在没? 谁有免费的套打的控件 或者 实例??? 这样代码能实现图片提交的功能却实现不了重置的功能!? MzTreeView 1.0 问题,如何得到选中的节点。或者如何给节点赋click事件。 这个方法搞不清。 如何取到iframe中表单元素的值? extjs fileuploadfield IE 兼容 下面这个函数中的参数为啥写成这样 我听说ms的js和netscape的js有不同是吗?不知道有什么不同? 急救:请问在JS中怎样实现下面的功能?
<HTML>
<HEAD>
<TITLE>Outlook ToolBar</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" name="GENERATOR">
<STYLE type="text/css">BODY {
FONT-WEIGHT: normal; FONT-SIZE: 11pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal
}
.blue {
COLOR: blue
}
.red {
COLOR: red
}
INPUT {
FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal
}
TD {
FONT-WEIGHT: normal; FONT-SIZE: 10.5pt; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-VARIANT: normal
}
</STYLE>
<SCRIPT language="javascript">
<!--
//Size of buttons.
var BTN_HEIGHT = 25;
var BTN_WIDTH = 100;
//Space between buttons.
var BTN_SPACE =0;var ITM_HEIGHT = 80;
var ITM_SPACE = 2;var ButtonCount = 0;
var ItemCounts;
var FocusButton;
//reset postion of buttons and items, show clicked button's items, hide other items.
function onBtnClick(btnIndex)
{
var i;
var minHeight;
var btmBtnTop;
if ((btn < 0) || (btn >= ButtonCount)) return;
document.body.scrollTop = 0;
for(i=0; i<=btnIndex; i++)
{
var btn = document.all.item("BTN" + i);
if (btn == null)
alert("NULL BTN");
else
btn.style.posTop = i * (BTN_HEIGHT + BTN_SPACE);
};
//minimun height used by buttons and items.
minHeight = ButtonCount * (BTN_HEIGHT + BTN_SPACE) - BTN_SPACE + ItemCounts[btnIndex] * (ITM_HEIGHT + ITM_SPACE);
//calculate bottom button's start top position.
if (minHeight > document.body.clientHeight)
{
document.body.setAttribute("SCROLL", "YES", false);
btmBtnTop = (btnIndex+1) * (BTN_HEIGHT + BTN_SPACE) - BTN_SPACE + ItemCounts[btnIndex] * (ITM_HEIGHT + ITM_SPACE);
}
else
{
document.body.setAttribute("SCROLL", "NO", false);
btmBtnTop = document.body.clientHeight - (ButtonCount - btnIndex -1) * (BTN_HEIGHT + BTN_SPACE);
}
for(i=btnIndex + 1; i<ButtonCount; i++)
{
var btn = document.all.item("BTN" + i);
if (btn == null)
alert("NULL BTN");
else
btn.style.posTop = btmBtnTop;
btmBtnTop += (BTN_HEIGHT + BTN_SPACE);
};
var itmtop = (BTN_HEIGHT + BTN_SPACE) * (btnIndex + 1);
for(i=0; i<ButtonCount; i++)
for(j=0; j<ItemCounts[i]; j++)
{
var tbl = document.all.item("ITM" + i + "_" + j);
if (null == tbl) continue;
if (i == btnIndex)
{
tbl.style.posTop = itmtop + j * (ITM_HEIGHT + ITM_SPACE);
tbl.style.visibility = "visible";
}
else
tbl.style.visibility = "hidden";
//tbl.style.display = "none";
}
FocusButton = btnIndex;
};function onResize()
{
onBtnClick(FocusButton);
}function constructmenu()
{
var i,j;
var str;
str = "";
ItemCounts = new Array();
for(i=0; i<mytree.children.length; i++)
{
var item = mytree.children.item(i);
str += '<INPUT TYPE="BUTTON" '+
'ID="BTN' + i + '" '+
'VALUE="' + item.getAttribute("VALUE") +'" ' +
'STYLE="position:absolute; HEIGHT: ' + BTN_HEIGHT + 'px; WIDTH: ' + BTN_WIDTH + 'px;" ' +
'ONCLICK="onBtnClick(' + i +');' +
'">';
str += '\n<BR>';
ItemCounts[i] = 0;
for(j=0; j < item.children.length; j++)
{
str += '<TABLE WIDTH=' + BTN_WIDTH + ' ID="ITM' + i + '_' + j + '" STYLE="position:absolute;">';
str += '<TR><TD ALIGN=CENTER>';
str += '<A HREF=' + item.children.item(j).getAttribute("HREF") + ' TARGET="CONTENTS">';
str += '<IMG SRC="' + item.children.item(j).getAttribute("IMGSRC") + '" ALIGN=CENTER STYLE="border:none;">';
str += '</A>';
str += '</TD></TR>';
str += '<TR><TD ALIGN=CENTER>';
str += item.children.item(j).getAttribute("VALUE");
str += '</TD></TR>';
str += '</TABLE>';
ItemCounts[i] ++;
}
ButtonCount ++;
}
menu.outerHTML = str; onBtnClick(0);
//menu.innerText = str;
FocusButton = 0;
window.onresize = onResize;
}//-->
</SCRIPT>
</HEAD>
<BODY leftMargin="0" onload="constructmenu()">
<UL id="mytree" style="DISPLAY: none">
<LI value="Mail">
<UL HREF="contents.htm" VALUE="InBox" IMGSRC="inbox.gif">
</UL>
<UL HREF="contents.htm" VALUE="OutBox" IMGSRC="outbox.gif">
</UL>
<UL HREF="contents.htm" VALUE="Sent" IMGSRC="sentitems.gif">
</UL>
<UL HREF="contents.htm" VALUE="Deleted" IMGSRC="deleted.gif">
</UL>
<LI value="Contacts">
<UL HREF="contents.htm" VALUE="Contacts" IMGSRC="contacts.gif">
</UL>
<LI value="Other">
<UL HREF="contents.htm" VALUE="Journal" IMGSRC="journal.gif">
</UL>
<UL HREF="contents.htm" VALUE="Tasks" IMGSRC="tasks.gif">
</UL>
<UL HREF="contents.htm" VALUE="Notes" IMGSRC="notes.gif">
</UL>
<UL HREF="contents.htm" VALUE="Calendar" IMGSRC="calendar.gif">
</UL>
</LI>
</UL>
<DIV id="menu"></DIV>
</BODY>
</HTML>