liuquanqi

          java

          常用鏈接

          統計

          最新評論

          用JS打開.exe文件 和 默認文本框焦點

          <%@ 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><!--??
          一個空連接實現至頂
          -->
          </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?? +?? '?? 已經被用戶禁止!');????
          ????????????????? 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文件 和 默認文本框焦點 2013-12-16 11:15 老咯

          一樣  回復  更多評論   


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


          網站導航:
           
          主站蜘蛛池模板: 南靖县| 庄河市| 顺义区| 新巴尔虎左旗| 石台县| 临湘市| 吉隆县| 双桥区| 陵川县| 常州市| 乐陵市| 孟津县| 泌阳县| 郴州市| 宁国市| 白城市| 轮台县| 阳山县| 抚松县| 柞水县| 广饶县| 东光县| 渝中区| 安宁市| 江源县| 衡阳县| 阿克| 闽清县| 同心县| 洪洞县| 汝城县| 石泉县| 绥化市| 兖州市| 平江县| 扶沟县| 云阳县| 蓝田县| 陆良县| 辰溪县| 盐边县|