欢迎来到福编程网,本站提供各种互联网专业知识!

javascript技巧

  • firefox中用javascript实现鼠标位置的定位

    /***取得鼠标坐标*@returnPosition*/functiongetMouseLocation(){if(ns4||ns6){mouseX=e.pageX;mouseY=e.pageY;}else{mouseX=event.x+document.body.scrollLeft;mouseY=event.y+document.body.scrollTop;}return{x:mouseX,y:mouseY};}在strict下document.body

    更新于2007-06-17
  • div+css实现鼠标放上去,背景跟图片都会变化。

    NewDocumentul{list-style:none;}a{padding-left:1.5em;font-size:12px;height:23px;line-height:23px;color:gray;text-decoration:none;}a:link,a:visited{background:url(/article/upimages/bbs_bg_off.gif);}a:hover,a:active{background:url(/article/upi

    更新于2007-06-17
  • use jscript Create a SQL Server database

    CreateaSQLServerdatabase.复制代码代码如下:DB_SIZE_IN_MEGABYTES=5strDBServerName="."SetobjSQLServer=CreateObject("SQLDMO.SQLServer")objSQLServer.LoginSecure=TrueobjSQLServer.ConnectstrDBServerNameSetobjDB=CreateObject("SQLDMO.Database"

    更新于2007-06-16
  • Sample script that deletes a SQL Server database

    SamplescriptthatdeletesaSQLServerdatabase.SupportedPlatformsSQLServer2000YesScriptCode复制代码代码如下:strDBServerName="."strDBToDelete="ScriptingGuysTestDB"SetobjSQLServer=CreateObject("SQLDMO.SQLServer")objSQLServer.LoginSecure

    更新于2007-06-16
  • Sample script that displays all of the users in a given SQL Server DB

    SamplescriptthatdisplaysalloftheusersinagivenSQLServerDB.SupportedPlatformsSQLServer2000YesScriptCode复制代码代码如下:strDBServerName="."strDBName="ScriptingGuysTestDB"SetobjSQLServer=CreateObject("SQLDMO.SQLServer")objSQLServer.Login

    更新于2007-06-16
  • Add a Formatted Table to a Word Document

    DemonstrationscriptthatretrievesservicedatafromacomputerandthendisplaysthatdatainaformattedtableinMicrosoftWord.复制代码代码如下:SetobjWord=CreateObject("Word.Application")objWord.Visible=TrueSetobjDoc=objWord.Documents.Add()SetobjRan

    更新于2007-06-15
  • Add a Picture to a Microsoft Word Document

    Demonstrationscriptthataddsapicture(C:\Scripts\Logo.jog)toaMicrosoftWorddocument复制代码代码如下:SetobjWord=CreateObject("Word.Application")objWord.Visible=TrueSetobjDoc=objWord.Documents.Add()SetobjSelection=objWord.SelectionSetobjShap

    更新于2007-06-15
  • Add a Table to a Word Document

    DemonstrationscriptthatretrievesserviceinformationfromacomputerandthendisplaysthatinformationintabularformatinMicrosoftWord.复制代码代码如下:SetobjWord=CreateObject("Word.Application")objWord.Visible=TrueSetobjDoc=objWord.Documents.Ad

    更新于2007-06-15
  • Add Formatted Text to a Word Document

    DemonstrationscriptthatdisplaysformatteddatainaMicrosoftWorddocument.复制代码代码如下:SetobjWord=CreateObject("Word.Application")objWord.Visible=TrueSetobjDoc=objWord.Documents.Add()SetobjSelection=objWord.SelectionobjSelection.Font.Name=

    更新于2007-06-15
  • 用jscript实现新建和保存一个word文档

    Demonstrationscriptthatretrievesnetworkadapterdatafromacomputer,displaysthatdatainaMicrosoftWorddocument,andthensavesthedocumentasC:\Scripts\Word\Testdoc.doc.复制代码代码如下:SetobjWord=CreateObject("Word.Application")objWord.Capti

    更新于2007-06-15
  • Open and Print a Word Document

    DemonstrationscriptthatopensandprintsandexistingMicrosoftWorddocument.复制代码代码如下:SetobjWord=CreateObject("Word.Application")SetobjDoc=objWord.Documents.Open("c:cripts\inventory.doc")objDoc.PrintOut()objWord.Quit

    更新于2007-06-15
  • Use Word to Search for Files

    DemonstrationscriptthatusesMicrosoftWordtolocateallthe.mp3filesstoredondriveCofthelocalcomputer复制代码代码如下:SetobjWord=CreateObject("Word.Application")SetobjDoc=objWord.Documents.Add()objWord.FileSearch.FileName="*.mp3"objWord.FileS

    更新于2007-06-15
  • 去除图像或链接黑眼圈的两种方法总结

    一、用htc实现。eye.htcfunctionexample(){this.blur();}a{behavior:url(eye.htc)}二、a{link:expression(this.onfocus=this.blur)}blueidea[Ctrl+A全选注:如需引入外部Js需刷新才能执行]

    更新于2007-06-14
  • 一款JavaScript压缩工具:X2JSCompactor

    去年写的一个JavaScript压缩工具,用于x2blog.cn的js压缩。不过一直没有对外发布,现在拿来充个文章数吧,老不更新Blog可不好,呵呵概述:X2JavascriptCompactor可以将多个Javascript脚本文件打包成一个文件,并删除原始文件中的注释、无用空白以及换行。不仅

    更新于2007-06-13
  • iis6+javascript Add an Extension File

    DescriptionAddstheBITS_Update.dllextensionfile.复制代码代码如下:strComputer="."SetobjWMIService=GetObject_("winmgmts:{authenticationLevel=pktPrivacy}\\"_&strComputer&"\root\microsoftiisv2")SetcolItems=objWMIService.ExecQuery_("Se

    更新于2007-06-13
  • jscript之Open an Excel Spreadsheet

    DescriptionDemonstrationscriptthatopensanexistingExcelspreadsheetnamedC:\Scripts\New_users.xls.复制代码代码如下:SetobjExcel=CreateObject("Excel.Application")SetobjWorkbook=objExcel.Workbooks.Open("C:\Scripts\New_users.xls")

    更新于2007-06-13
  • jscript之Read an Excel Spreadsheet

    DescriptionDemonstrationscriptthatreadsthevaluesstoredinaspreadsheetnamedC:\Scripts\New_users.xls.ScriptCode复制代码代码如下:SetobjExcel=CreateObject("Excel.Application")SetobjWorkbook=objExcel.Workbooks.Open_("C:\Scripts\New_users.x

    更新于2007-06-13
  • jscript之List Excel Color Values

    DescriptionDemonstrationscriptthatdisplaysthevariouscolors--andtheirrelatedcolorindex--availablewhenprogrammaticallycontrollingMicrosoftExcel.ScriptCode复制代码代码如下:setobjExcel=CreateObject("Excel.Application")objExcel.Visible=Tru

    更新于2007-06-13
  • List Installed Hot Fixes

    Returnsalistofallthehotfixesinstalledonacomputer.ScriptCode复制代码代码如下:varwbemFlagReturnImmediately=0x10;varwbemFlagForwardOnly=0x20;varobjWMIService=GetObject("winmgmts:\\\\.\\root\\CIMV2");varcolItems=objWMIService.ExecQuer

    更新于2007-06-12
  • excel操作之Add Data to a Spreadsheet Cell

    ScriptCode复制代码代码如下:SetobjExcel=CreateObject("Excel.Application")objExcel.Visible=TrueobjExcel.Workbooks.AddobjExcel.Cells(1,1).Value="Testvalue"

    更新于2007-06-12