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

📄 model.htm

📁 oracle DBA的资料
💻 HTM
📖 第 1 页 / 共 2 页
字号:
	
	
	//document.execCommand('copy')
	
	//document.execCommand('SaveAs',null,tmp)
	
}

function creHeader(){

	var outStr
	
	clearText1(document.outputForm.t1)
        
        outStr = "<html>\n"
        outStr += "<head>\n"
        outStr += "<meta http-equiv=\"content-type\" content=\"text\/html; charset=gb2312\">\n"
        outStr += "<title>Ocp test <\/title>\n"
        outStr += "<\/head>\n"
        outStr += "<body bgcolor=\"white\" text=\"black\" link=\"blue\" vlink=\"purple\" alink=\"red\">\n"
        
        document.outputForm.t1.value = outStr
      
}



function quHeader(){

	var outStr
	var tmp
	var getDefault
	
	clearText1(document.outputForm.t1)
 	
 	
 //	 validateNum(document.fileSec.num.value):document.fileSec.num.value?"001"
       if (validateNum(document.fileSec.num.value)){
            getDefault = document.fileSec.num.value
          }
       else{
             getDefault = "001"	
 	   }
 	   
 	//if you cancel input ,return -1
 	tmp   = prompt('Question Number',getDefault)
 	if (tmp == null){ 
            return (-1) 
        }
        
        document.fileSec.fileType[1].selected= true
                
        outStr = "<html>\n"
        outStr += "<head>\n"
        outStr += "<meta http-equiv=\"content-type\" content=\"text\/html; charset=gb2312\">\n"
        outStr += "<title>Ocp test <\/title>\n"
        outStr += "<\/head>\n"
        outStr += "<body bgcolor=\"white\" text=\"black\" link=\"blue\" vlink=\"purple\" alink=\"red\">\n"
        outStr += "<p align=\"left\" color=\"black\" style=\"font-size:16pt;\">\n"
        outStr += "\t<b>QUESTION "
      
        document.fileSec.num.value = tmp
        outStr += tmp
        outStr += "\t<\/b>\n<\/p>"
        outStr += "<hr color=\"#99CCFF\">\n\n"
        document.outputForm.t1.value = outStr
      
}





function creTailer(){

         document.outputForm.t1.value += "\n<\/body>\n" + "<\/html>\n"
         document.fileSec.bb.value = (document.fileSec.fileType.selectedIndex?"que_":"exp_") + document.fileSec.num.value + ".htm"
         document.fileSec.bb.select()
     
}


function expPara(type){

var tmpStr
var outStr
var tmp
var getDefault

        	tmpStr = escape(document.inputForm.t1.value)
               	tmpStr = tmpStr.replace(/%0A/g,"!") 
        	tmpStr = unescape(tmpStr)  
       
           if (type == "exp"){
           
       		if (validateNum(document.fileSec.num.value)){
            		getDefault = document.fileSec.num.value
          	   }
       		else{
             		getDefault = "001"	
 	   	   }
 	   	
 	   	
                tmp   = prompt('Input Number to question explaination',getDefault)
                if (tmp == null){ 
                    return (-1) 
                 }
                 
                document.fileSec.fileType[0].selected= true
                 
                 
                outStr = "<p><b><span style=\"font-size:22pt\">Explaination "
                
                document.fileSec.num.value = tmp                
                outStr += tmp
                outStr += ": &nbsp;<\/span><\/b><\/p>\n\n"
                outStr += "<span style=\"font-size:18pt\">\n\t<p>\n\t"
               }
           else{
                outStr = "<span style=\"font-size:18pt\">\n\t<p>\n\t"
               }
              
        for(var i = 0; i < tmpStr.length; i++){
              var oneChar = tmpStr.charAt(i)   
             if ( i+1 == tmpStr.length){
                continue
              }
             
                               
              if (oneChar == "!"){
                                        
                outStr += "<br>\n\t<\/p>\n\n\t<p>\n\t  "
                continue
                 
              }
              
                outStr += oneChar
              
              
            } 
             
		outStr += "\n\t<\/p>\n\n<\/span>\n"
        
     //   outStr = unescape(outStr)
               
        	document.outputForm.t1.value += outStr
       		



}
function genNewFile(){
var tmpStr = document.outputForm.t1.value
//alert (tmpStr)
document.write(tmpStr)
document.close

}

function genNewFilea(){
//button name for this function is "view"


var tmpStr
var outStr

        tmpStr = escape(document.outputForm.t1.value)
        tmpStr = tmpStr.replace(/%0A/g,"!")
 //       alter(tmpstr)
        for(var i = 0; i < tmpStr.length; i++){
              var oneChar = tmpStr.charAt(i)   
             if ( i+1 == tmpStr.length){
                continue
              }
            
                               
              if (oneChar == "!"){
                document.write("<br>")                        
                continue
                 
              }
              
                document.write(oneChar)
              
              
            }

}

function pastePool(){
//get file from paste

        var str = "";
      //  rtf.focus();
    //    rtf.document.body.innerHTML = "";
  //      document.execCommand("selectAll");
  //      str = document.body.innerHTML;
 //      if(str.length == 0) {
 //               alert("剪切板内无数据!");
 ////               return (-1);
 //       }

   document.inputForm.t1.select()
   document.execCommand('paste',false,null)
//document.getElementById("edit").contentWindow.focus(); 
//document.getElementById('edit').contentWindow.document.execCommand('paste',false,null)
}

function selCopy(){

	 document.outputForm.t1.focus()
 	 document.execCommand("selectAll",false,null)
 	 document.execCommand("copy",false,null) 

}


</script>


</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">

<form name="outputForm"  method="POST" action="http://192.168.2.10:7777/cgi-bin/hello.pl">
Output TextArea:<input type="submit" value="Connect to Server" name="n1"><br>
<textarea name="t1" rows = "2" cols="80" wrap ="on">
</textarea><br>

</form>
<form name="fileSec">
<br>FileNumber:<input type="text" name="num" value="003" size="3" maxlength="3">
<input type="button" value="fileNum++" onClick="javascript:genFileName()">     FileType:
    <select name="fileType" size="1">
    <option selected value="exp" name="fileNum">Explaination</option>
    <option value="que" name="fileNum">Question</option>
    </select>
filename    
    
<input type="text" value="File name here!" name="bb">
</form>

<form name="commButton">

<input type="button" name="crHeader" value="Explaination Header" onClick="javascript:creHeader()">
<input type="button" name="exp" value="Explaination Paragraph" onClick="javascript:expPara('exp')">

<input type="button" name="createFile" value="View Result" onClick="javascript:genNewFile()"><br>

<input type="button" name="quHeade" value="Question Header" onClick="javascript:quHeader()">
<input type="button" name="gen" value="Question Paragraph" onClick="javascript:expPara('gen')">
<input type="button" name="ansSelect" value="Radio Table" onClick="javascript:bottonTable('radio')">
<input type="button" name="ansSelect1" value="Checkbox Table" onClick="javascript:bottonTable('checkbox')">
<input type="button" name="noButtonForm" value="Data Table" onClick="javascript:noButtonForm1()">
<input type="button" name="tableForm" value="Stucture Table " onClick="javascript:tableStructure()">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
<input type="button" name="crTailer" value="Create Footer" onClick="javascript:creTailer()"><BR><BR>
<input type="button" value="Add <p>" onClick="Javascript:document.outputForm.t1.value += '<p>'">
<input type="button" value="Paste and Add </p>" onClick="Javascript:document.outputForm.t1.value += document.inputForm.t1.value + '<\/p>'"><BR><BR>
<input type="button" name="clearText" value="Clear Output Text" onClick="clearText1(outputForm.t1)">
<input type="button" name="clearText" value="Clear Input Text" onClick="clearText1(inputForm.t1)">
<input type="button" name="pasText" value="Paste To Input Pool" onClick="pastePool()">
<input type="button" name="selCopyBotton" value="Select output & Copy" onClick="selCopy()">
</form>






<form name="inputForm">
<textarea name="t1" rows = "9" cols="104" wrap ="on" >
</textarea>
<BR>
</form>



</body>

</html>

⌨️ 快捷键说明

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