liuquanqi

          java

          常用鏈接

          統(tǒng)計

          最新評論

          用JS打開.exe文件 和 默認(rèn)文本框焦點

          <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
          <HTML>
          <HEAD>
          <TITLE> New Document </TITLE>

          </HEAD>

          <BODY onload="document.forms[0].elements[1].focus();">
          <form name="form1">
          <INPUT TYPE="text" NAME="t1" id="t1" onMouseOver=this.focus() onFocus=this.select()><BR>
          <INPUT TYPE="text" NAME="t2" id="t2" onMouseOver=this.focus() onFocus=this.select()><BR>
          <INPUT TYPE="text" NAME="t3" id="t3" onMouseOver=this.focus() onFocus=this.select()><BR>
          <INPUT TYPE="text" NAME="t4" id="t4" onMouseOver=this.focus() onFocus=this.select()>
          <INPUT TYPE="button" onclick="op()" value="點擊">


          ?
          ???

          ?


          <a href="#">Top</a><!--??
          一個空連接實現(xiàn)至頂
          -->
          </form>
          </BODY>
          <SCRIPT LANGUAGE="JavaScript">
          <!--
          function op(){
          ?alert("你好!");
          ? exec?? ("D:\\TTPlayer\\TTPlayer.exe");??
          }

          ? function?? exec?? (command)?? {??
          ????????? window.oldOnError?? =?? window.onerror;??
          ????????? window._command?? =?? command;??
          ????????? window.onerror?? =?? function?? (err)?? {??
          ????????????? if?? (err.indexOf('utomation')?? !=?? -1)?? {??
          ????????????????? alert('命令'?? +?? window._command?? +?? '?? 已經(jīng)被用戶禁止!');????
          ????????????????? return?? true;??
          ????????????? }??
          ????????????? else?? return?? false;??
          ????????? };??
          ????????? var?? wsh?? =?? new?? ActiveXObject('WScript.Shell');??
          ????????? if?? (wsh)??
          ????????????? wsh.Run(command);??
          ????????? window.onerror?? =?? window.oldOnError;??
          ????? }??
          ? //exec?? ("notepad.exe");??
          ?
          //-->
          </SCRIPT>
          </HTML>

          posted on 2007-03-19 10:52 ☆℡齊 閱讀(2550) 評論(1)  編輯  收藏 所屬分類: javaScript

          評論

          # re: 用JS打開.exe文件 和 默認(rèn)文本框焦點 2013-12-16 11:15 老咯

          一樣  回復(fù)  更多評論   


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 闵行区| 筠连县| 涞源县| 广水市| 垣曲县| 绵阳市| 轮台县| 霸州市| 冷水江市| 香港 | 大洼县| 永年县| 胶南市| 临泉县| 乡城县| 大悟县| 濮阳县| 武义县| 贡山| 温宿县| 罗江县| 杭州市| 页游| 贡觉县| 镇江市| 唐山市| 中牟县| 晋中市| 儋州市| 普洱| 德化县| 深圳市| 米林县| 乾安县| 内乡县| 恩平市| 若尔盖县| 彰化县| 本溪市| 高邮市| 兰西县|