<style type=text/css>
.select {
BORDER-BOTTOM: buttonface 0px inset; BORDER-LEFT: buttonface 0px inset; BORDER-RIGHT: buttonface 0px inset; BORDER-TOP: buttonface 0px inset; CURSOR: default; FONT: icon; WIDTH: 100px
}
.selected {
BACKGROUND: window; BORDER-BOTTOM: buttonface 0px inset; BORDER-LEFT: buttonface 0px inset; BORDER-RIGHT: buttonface 0px inset; BORDER-TOP: buttonface 0px inset; FONT: icon; PADDING-BOTTOM: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px
}
.selectTable {
BACKGROUND: buttonface; BORDER-BOTTOM: buttonhighlight 2px inset; BORDER-LEFT: buttonhighlight 2px inset; BORDER-RIGHT: buttonhighlight 2px inset; BORDER-TOP: buttonhighlight 2px inset; HEIGHT: 100%; WIDTH: 100%
}
.option {
FONT: icon; PADDING-BOTTOM: 1px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; PADDING-TOP: 1px; WIDTH: 100%
}
.dropDown {
BACKGROUND: window; BORDER-BOTTOM: windowtext 1px solid; BORDER-LEFT: windowtext 1px solid; BORDER-RIGHT: windowtext 1px solid; BORDER-TOP: windowtext 1px solid; PADDING-BOTTOM: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px; POSITION: absolute; VISIBILITY: hidden; WIDTH: 100%
}
.select .button {
BORDER-BOTTOM: buttonhighlight 2px outset; BORDER-LEFT: buttonhighlight 2px outset; BORDER-RIGHT: buttonhighlight 2px outset; BORDER-TOP: buttonhighlight 2px outset; FONT-FAMILY: webdings; FONT-SIZE: 11px; HEIGHT: 5px; PADDING-BOTTOM: 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px; WIDTH: 16px
}
</style>
<SCRIPT type=text/javascript>
var overOptionCss = "background: highlight; color: highlighttext";
var sizedBorderCss = "2 inset buttonhighlight";
var globalSelect; //This is used when calling an unnamed selectbox with onclick="this.PROPERTY"
var ie4 = (document.all != null);
var q = 0;
function initSelectBox(el) {
copySelected(el);
var size = el.getAttribute("size");
// These two lines combined with execution in optionClick() allow you to write:
// onchange="alert(this.options[this.selectedIndex].value)"
el.options = el.children[1].children;
el.selectedIndex = findSelected(el); //Set the index now!
// Some methods that are supported on the real SELECT box
el.remove = new Function("i", "int_remove(this,i)");
el.item = new Function("i", "return this.options[i]");
el.add = new Function("e", "i", "int_add(this, e, i)");
// The real select box let you have lot of options with the same NAME. In that case the item
// needs two arguments. When using DIVs you can't have two with the same NAME (or ID) and
// then there is no need for the second argument
el.options[el.selectedIndex].selected = true;
dropdown = el.children[1];
if (size != null) {
if (size > 1) {
el.size = size;
dropdown.style.zIndex = 0;
initSized(el);
}
else {
el.size = 1;
dropdown.style.zIndex = 99;
if (dropdown.offsetHeight > 200) {
dropdown.style.height = "200";
dropdown.style.overflow = "auto";
}
}
}
highlightSelected(el,true);
}
function int_remove(el,i) {
if (el.options[i] != null)
el.options[i].outerHTML = "";
}
function int_add(el, e, i) {
var html = "<div class='option' noWrap";
if (e.value != null)
html += " value='" + e.value + "'";
if (e.style.cssText != null)
html += " style='" + e.style.cssText + "'";
html += ">";
if (e.text != null)
html += e.text;
html += "</div>"
if ((i == null) || (i >= el.options.length))
i = el.options.length-1;
el.options[i].insertAdjacentHTML("AfterEnd", html);
}
function initSized(el) {
//alert("initSized -------->");
var h = 0;
el.children[0].style.display = "none";
dropdown = el.children[1];
dropdown.style.visibility = "visible";
if (dropdown.children.length > el.size) {
dropdown.style.overflow = "auto";
for (var i=0; i<el.size; i++) {
h += dropdown.children[i].offsetHeight;
}
if (dropdown.style.borderWidth != null) {
dropdown.style.pixelHeight = h + 4; //2 * parseInt(dropdown.style.borderWidth);
}
else
dropdown.style.height = h;
}
dropdown.style.border = sizedBorderCss;
el.style.height = dropdown.style.pixelHeight;
}
function copySelected(el) {
var selectedIndex = findSelected(el);
selectedCell = el.children[0].rows[0].cells[0];
selectedDiv = el.children[1].children[selectedIndex];
selectedCell.innerHTML = selectedDiv.outerHTML;
}
// This function returns the first selected option and resets the rest
// in case some idiot has set more than one to selcted :-)
function findSelected(el) {
var selected = null;
ec = el.children[1].children; //the table is the first child
var ecl = ec.length;
for (var i=0; i<ecl; i++) {
if (ec[i].getAttribute("selected") != null) {
if (selected == null) { // Found first selected
selected = i;
}
else
ec[i].removeAttribute("selected"); //Like I said. Only one selected!
}
}
if (selected == null)
selected = 0; //When starting this is the most logic start value if none is present
return selected;
}
function toggleDropDown(el) {
if (el.size == 1) {
dropDown = el.children[1];
if (dropDown.style.visibility == "")
dropDown.style.visibility = "hidden";
if (dropDown.style.visibility == "hidden")
showDropDown(dropDown);
else
hideDropDown(dropDown);
}
}
function optionClick() {
el = getReal(window.event.srcElement, "className", "option");
if (el.className == "option") {
dropdown = el.parentElement;
selectBox = dropdown.parentElement;
oldSelected = dropdown.children[findSelected(selectBox)]
if(oldSelected != el) {
oldSelected.removeAttribute("selected");
el.setAttribute("selected", 1);
selectBox.selectedIndex = findSelected(selectBox);
}
if (selectBox.onchange != null) { // This executes the onchange when you chnage the option
if (selectBox.id != "") { // For this to work you need to replace this with an ID or name
eval(selectBox.onchange.replace(/this/g, selectBox.id));
}
else {
globalSelect = selectBox;
eval(selectBox.onchange.replace(/this/g, "globalSelect"));
}
}
if (el.backupCss != null)
el.style.cssText = el.backupCss;
copySelected(selectBox);
toggleDropDown(selectBox);
highlightSelected(selectBox, true);
}
}
function optionOver() {
var toEl = getReal(window.event.toElement, "className", "option");
var fromEl = getReal(window.event.fromElement, "className", "option");
if (toEl == fromEl) return;
var el = toEl;
if (el.className == "option") {
if (el.backupCss == null)
el.backupCss = el.style.cssText;
highlightSelected(el.parentElement.parentElement, false);
el.style.cssText = el.backupCss + "; " + overOptionCss;
this.highlighted = true;
}
}
function optionOut() {
var toEl = getReal(window.event.toElement, "className", "option");
var fromEl = getReal(window.event.fromElement, "className", "option");
if (fromEl == fromEl.parentElement.children[findSelected(fromEl.parentElement.parentElement)]) {
if (toEl == null)
return;
if (toEl.className != "option")
return;
}
if (toEl != null) {
if (toEl.className != "option") {
if (fromEl.className == "option")
highlightSelected(fromEl.parentElement.parentElement, true);
}
}
if (toEl == fromEl) return;
var el = fromEl;
if (el.className == "option") {
if (el.backupCss != null)
el.style.cssText = el.backupCss;
}
}
function highlightSelected(el,add) {
var selectedIndex = findSelected(el);
selected = el.children[1].children[selectedIndex];
if (add) {
if (selected.backupCss == null)
selected.backupCss = selected.style.cssText;
selected.style.cssText = selected.backupCss + "; " + overOptionCss;
}
else if (!add) {
if (selected.backupCss != null)
selected.style.cssText = selected.backupCss;
}
}
function hideShownDropDowns() {
var el = getRea
没有合适的资源?快使用搜索试试~ 我知道了~
asp 标签替换
共71个文件
asp:26个
png:21个
gif:13个
3星 · 超过75%的资源 需积分: 9 84 下载量 4 浏览量
2008-04-19
18:08:11
上传
评论
收藏 86KB RAR 举报
温馨提示
asp 标签替换asp 标签替换asp 标签替换
资源推荐
资源详情
资源评论
收起资源包目录
kktTemplate2.rar (71个子文件)
kktTemplate
test.asp 864B
main.asp 2KB
Filesave.asp 4KB
Menu
public.js 26KB
xpMenu.css 1KB
blueHead.js 1KB
images
config.png 714B
news_mb.png 762B
index_go.png 861B
news_go.png 756B
static_mb.png 833B
link.png 343B
static.png 635B
ArrWV.gif 1KB
bg_m.gif 524B
SysLog.png 317B
key.png 612B
class_go.png 842B
index.png 806B
news_class.png 754B
bg_r_top.gif 57B
CompactDB.png 755B
Member.png 753B
author.png 824B
static_class.png 830B
news.png 649B
ArrW.gif 1KB
static_go.png 779B
Common.png 939B
bg_r.gif 51B
ArrBV.gif 1KB
vote.gif 644B
bg_m_top.gif 545B
script.png 880B
BakDB.png 666B
ArrB.gif 1KB
Sample1.asp 3KB
myTemple.asp 99B
public.js 26KB
test
www.programfan.combc.gif 2KB
index.asp 766B
Menu.asp 2KB
Sample2.asp 462B
save.asp 1KB
Sample3.asp 792B
www.programfan.combc.gif 2KB
新建 文本文档.txt 0B
myTemple3.tpl 404B
kktTemplate.inc.asp 7KB
blueHead.js 1KB
kktTemplate.inc 7KB
lable.asp 6KB
myTemple2.tpl 252B
daohang
daohang7.asp 2KB
daohang9.asp 1KB
daohang.asp 15KB
daohang11.asp 3KB
daohang3.asp 7KB
daohang5.asp 22KB
daohang1.asp 646B
daohang2.asp 17KB
带图像的下拉菜单.txt 14KB
daohang6.asp 2KB
daohang8.asp 3KB
daohangtest.asp 69B
daohang4.asp 7KB
daohang10.asp 4KB
file
index_dreamweaver.gif 2KB
index_fireworks.gif 2KB
daohang.js 14KB
conn.asp 60B
共 71 条
- 1
资源评论
- xuemu20082018-06-24这是多年前的,当时学习中还不错吧
- lkfdjg12013-09-15测试文件多,广告太多,功能不全
bwjzy999
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功