quot;CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height=0 id=wb name=wb width=0></OBJECT>
<input type=button value=打印预览 onclick="wb.execwb(7,1)">
<input type=button onClick=document.all.wb.ExecWB(6,1) value="打印">//
152.不通过form,直接通过名字引用对象
<INPUT TYPE="text" NAME="gg" value=aaaaa>
<script LANGUAGE="Javascript">
<!--
alert(document.all.gg.value)
//-->
</script>//
153.使鼠标滚轮失效
function document.onmousewheel()
{
return false;
}//
154.创建弹出窗口
<script LANGUAGE="Jscript">
var ōPopup = window.createPopup();
var ōPopupBody = oPopup.document.body;
oPopupBody.innerHTML = "Display some <B>HTML</B> here.";
oPopup.show(100, 100, 200, 50, document.body);
</script>//
155.取得鼠标所在处的对象
var ōbj = document.elementFromPoint(event.x,event.y);//
156.获得左边的对象
<INPUT TYPE="text" NAME="gg"><INPUT TYPE="text" NAME="bb"
onclick="this.previousSibling.value='guoguo'">//
157.定位鼠标
document.all.hint_layer.style.left = event.x+document.body.scrollLeft+10;
document.all.hint_layer.style.top = event.y+document.body.scrollTop+10;//
158.向下拉框指定位置添加项目
var op = document.createElement("OPTION");
document.all.selected_items.children(index).insertAdjacentElement("BeforeBegin",op);
op.text = document.all.all_items[i].text;
op.value = document.all.all_items[i].value;//
159.判断一个窗口是否已经打开,如果已经打开,则关闭之
var a;
if(a)
a.close();
else
a=window.open('','','');//
160.动态创建一个标签
newElem = document.createElement("DIV");
newElem.id = "hint_layer";
document.body.appendChild(newElem);
document.all.hint_layer.innerText="guoguo";//
161.标题栏
document.title//
162.背景图片
<body style="BACKGROUND-ATTACHMENT: fixed" background="img/bgfix.gif" ></body>//背景图片不动
<STYLE TYPE="text/css">
<!--
BODY {background-image:img/bgchild.jpg;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;}
-->
</STYLE>//背景图片居中
163.设置透明效果
document.form.xxx.filters.alpha.opacity=0~100//
164.定义方法
var dragapproved=false;
document.onmouseup=new Function("dragapproved = false");//
165.将数字转化为人民币大写形式
function convertCurrency(currencyDigits) {
// Constants:
var MAXIMUM_NUMBER = 99999999999.99;
// Predefine the radix characters and currency symbols for output:
var CN_ZERO = "零";
var CN_ONE = "壹";
var CN_TWO = "贰";
var CN_THREE = "叁";
var CN_FOUR = "肆";
var CN_FIVE = "伍";
var CN_SIX = "陆";
var CN_SEVEN = "柒";
var CN_EIGHT = "捌";
var CN_NINE = "玖";
var CN_TEN = "拾";
var CN_HUNDRED = "佰";
var CN_THOUSAND = "仟";
var CN_TEN_THOUSAND = "万";
var CN_HUNDRED_MILLION = "亿";
var CN_SYMBOL = "人民币";
var CN_DOLLAR = "元";
var CN_TEN_CENT = "角";
var CN_CENT = "分";
var CN_INTEGER = "整";
// Variables:
var integral; // Represent integral part of digit number.
var decimal; // Represent decima