⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 attach.htm

📁 Windows Web脚本开发指南/(美) Dan Heflin, Todd Ney著 的源码
💻 HTM
字号:
<html XMLNS:UD>

<head>
	<title>HTC Wizard</title>
</head>
<script src="utilVBS.vbs" language="VBScript"></script>
<script src="utilJS.js" language="JScript"></script>
<script language="JavaScript">
function saveData(){
var i;
var data;
var cnt = 0;

	document.all.objUD.load("DHTMLWiz");
	for (i = 0; i < document.all.txtAttachName.length; i++){
		if (! validData(i)) 
			return;

		if (trimText(document.all.txtAttachProcName(i).value) != ""){
			cnt++;
			data = document.all.txtAttachProcName(i).value;
			data = data + '||' + document.all.txtAttachName(i).value;
			if (trimText(document.all.txtAttachID(i).value) != "")
				data = data + '||' + document.all.txtAttachID(i).value;
			else
				data = data + '||' + ' ';

			data = data + '||' + document.all.selAttachSourceEvent(i).options(document.all.selAttachSourceEvent(i).selectedIndex).value			
			document.all.objUD.setAttribute("DWAttach" + eval(cnt), data);
		}
	}

	document.all.objUD.setAttribute("DWAttachCount", eval(cnt));
	document.all.objUD.setAttribute("DWBtnAction", document.all.btnFinish.value );
	document.all.objUD.save("DHTMLWiz");
	
	if (buildFile()){
		alert("The " + document.all.objUD.getAttribute("txtCompName") + " component was successfully created in " + document.all.objUD.getAttribute("txtCompFileLoc") + ".");
		parent.window.close();			
	}
}
function validData(idx){
var valid = true;

	if ((trimText(document.all.txtAttachProcName(idx).value) == "") || (trimText(document.all.txtAttachName(idx).value) == "")){
		if (trimText(document.all.txtAttachID(idx).value) != "")
			valid = false;
		if (document.all.selAttachSourceEvent(idx).options(document.all.selAttachSourceEvent(idx).selectedIndex).value != "element")
			valid = false;
	}

	if (valid == false)
		alert("Data has been entered for row " + eval(1 + idx) + " but a name is required.");
	
	return valid;
	
}
function initPage(){
var i;

	document.all.objUD.load("DHTMLWiz");	
	for (i = 0; i < 10; i++)
		document.all.objUD.removeAttribute("DWAttach" + eval(i));

	document.all.objUD.removeAttribute("DWAttachCount");
	document.all.objUD.save("DHTMLWiz");	
}

</script>

<body bgcolor="#00CCFF" onload="initPage()">
<UD:UserData id="objUD" style="behavior:url(#default#userdata)" />
<p align="center">
<br>
<b><font size="6">HTML Component Wizard<br>
</font>
<br>
<font size="5">Create Attach Elements Page</font>
</b>
<table border="1" width="100%" height="195">
  <tr>
    <td width="30%" height="189" valign="top"><br>
      The Attach page will create the Attach elements for the HTML component. These
      Attach elements are events that are raised in the HTML component from an object in containing page.&nbsp;<br>
      <br>
      <font color="#FF0000">*</font>  required field
    </td>
    <td width="70%" height="189">
        <form>
        <table border="1" width="100%">
          <tr>
            <td width="31%" align="center"><b>Event Procedure Name <font color="#FF0000">*</font></b></td>
            <td width="29%" align="center"><b>Container Event <font color="#FF0000">*</font></b></td>
            <td width="23%" align="center"><b>Source of Event</b></td>
            <td width="17%" align="center"><b>ID</b></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" name="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" name="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" name="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" name="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" id="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" name="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" name="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" name="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" name="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" id="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" id="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" id="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" id="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" id="txtAttachID" size="7"></td>
          </tr>
          <tr>
            <td width="31%" align="center"><input type="text" name="txtAttachProcName" size="18"></td>
            <td width="29%" align="center"><input type="text" name="txtAttachName" size="17"></td>
            <td width="23%" align="center"><select size="1" id="selAttachSourceEvent">
                <option value="document">document</option>
                <option value="element" selected>element</option>
                <option value="window">window</option>
              </select></td>
            <td width="17%" align="center"><input type="text" id="txtAttachID" size="7"></td>
          </tr>
        </table>
        </form>
  	</tr>
</table>
<table border="0" width="100%">
	<tr>
   		<td width="50%"></td>
   		<td width="20%"><input type="button" value="Cancel" onclick="closeWindow()" name="btnCancel"></td>
   		<td width="15%"><input type="button" value="<< Back" onclick="goBack('event.htm')" name="btnBack"></td>
   		<td width="15%"><input type="button" value="Finish" onclick="saveData()" name="btnFinish"></td>
   </tr>
</table>
</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -