div及2级联动表的使用心得
2级联动表部分代码:
先将需要隐藏的内容写到以下的<div>标签中该标签的属性写成如下格式:
<div id="xxxx" style="display:none;">
</div>
以上代码表示,在div块中的代码将会被隐藏然后再javaScript代码中可写出方法使其显示,代码如下:
<script>
function test(){
var a=document.getElementById("xxx");
a.style.display="block";
}
2级联动表可通过该功能来实现,例:
html代码:<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<link href="./css/main.css" rel="stylesheet" type="text/css" />
</head>
<script src="./js/tool.js"></script>
<link href="./css/bodyStyle.css" rel="stylesheet" type="text/css">
<BODY BGCOLOR="ffffff" TEXT="000000" LINK="FF8000" VLINK="FF8000" Marginwidth=250 marginheight=250 leftmargin=100>
<table><tr align=center width='100%'><td colspan="2"><font size="6" color="#0000FF">Wdems示例展示首页</td><tr></table>
<jsp:include flush="true" page="test.jsp"></jsp:include>
<form name="form2">
<div id="frames">
<fieldset>
<legend>打印参数设置</legend>
<select name ="filename" onClick="setFileName()">
<option value="pass_goods_in">pass_goods_in</option>
<option value="DATE_and_HIDDEN_and_LIST_test_editmode_3">DATE_and_HIDDEN_and_LIST_test_editmode_3</option>
<option value="real">real</option>
<option value="TCertG21_0003">TCertG21_0003</option>
<option value="PICC">PICC</option>
<option value="AD_CONTRACT">AD_CONTRACT</option>
<option value="ecrPrnt">ecrPrnt</option>
<option value="test_use">test_use</option>
<option value="code128">code128</option>
<option value="stat">stat</option>
<option value="stat1">stat1</option>
<option value="CERT_B">FORMB</option>
<option value="FORM_P">FORM_P</option>
<option value="pass_goods_in">pass_goods_in</option>
<option value="goods_out">goods_out</option>
<option value="pass_goods_out">pass_goods_out</option>
<option value="chonfu_test">chonfu_test</option>
<option value="nine">九城表单测试</option>
<option value="FO-Element-test">FO元素和属性测试</option>
<option value="schemaobj_test">schemaobj_test</option>
<option value="font_text">font_text</option>
<option value="xialaliebiao_text">xialaliebiao_text</option>
<option value="riqi_text">riqi_text</option>
<option value="xialaliebiaowenti_text">xialaliebiaowenti_text</option>
<option value="riqiwenti_text">riqiwenti_text</option>
<option value="font_text2">font_text2</option>
<option value="baoxian">baoxian</option>
</select>
<TABLE width="700" height="40" BORDER=0 CELLPADDING=0 CELLSPACING=0>
<tr width="200">
<td width="150">
<select id="sle0" name="sle0" onClick="setValues1()">
<option value="change">请选择数据处理方式</option>
<option value="server">服务器端解析数据</option>
<option value="0">统一客户端</option>
</select>
</td>
<td width="150">
<div id="htmlPrintMode" style="display:none;">
<table>
<select id="sle1"name="sle1" onClick="setValues1()">
<option>前台显示</option>
<option value="2">后台打印</option>
<option value="3">生成文件</option>
</select>
</table>
</div>
</td>
<td width="20">
<div id="htmlPrintType" style="display:none;">
<table>
<select id="sle2" name="sle2" onClick="setValues1()">
<option >分组打印</option>
<option value="pr">打印</option>
<option value="4">打印PCL文件</option>
<option value="5">打印PS文件</option>
</select>
</table>
</div>
</td>
<td width="150">
<div id="htmlPrintFile" style="display:none;">
<table>
<select id="sle3" name="sle3" onClick="setValues1()">
<option value="8">生成PCL文件</option>
<option value="9">生成PS文件</option>
<option value="10">生成TXT文件</option>
<option value="11">生成png文件</option>
</select>
</table>
</div>
</td>
<td width="400">
<div id="htmlPrinterName" style="display:none;">
<table>请输入打印机名称<input type="text" id="printName" name="printName" value=""/></table>
</div>
</td>
</tr>
<tr align="right">隐藏打印并关闭按钮<input type="checkbox" id="printAndClose" name="printAndClose" value="no" ></tr>
<tr>不允许打印<input type="checkbox" id="isPrint" name="isPrint" value="no"></tr>
<tr>使用平滑处理<input type="checkbox" id="antialias" name="antialias" value="yes"></tr>
<tr>可进行编辑<input type="checkbox" id="isEdit" name="isEdit" value="yes"></tr>
<tr>工具栏位置<select name="tool" id="tool" value="">
<option value="top">top</option>
<option value="left">left</option>
<option value="right">right</option>
<option value="hide">hide</option>
</select>
</tr>
<tr>显示比例测试<input type="text" name="percent" id="percent"></tr>
</table>
<div id="htmlbut1" style="display:none;">
数据读取方式 <select name="data" id="data" value="">
<option value="readFile">直接读取文件</option>
<option value="servlet">通过Servlet读取文件</option>
</select>
<br><br><input type="button" value="Test" onClick="client()"/>
</div>
<div id="htmlbut2" style="display:none;">
<input type="button" value="Test" onClick="server()"/>
</div>
<div id="htmlbut3" style="display:none;">
<input type="button" value="提交" onClick="openWindow()"/>
</div>
</div>
</form>
<div id="htmlapp" style="display:none;">
<jsp:include page="/wisii/jsp/init.jsp" flush="true" />
</div>
</body>
</html>
javaScipt代码:
var str="";
var args1="AllBrowseTask,";
var args4="-servlet,/servlet/AllClientServlet?filename=";
var args2="frontServletTask,servlet/ClientfrontServlet?filename=";
var args3="BackServletTask,servlet/ClientfrontServlet?filename=";
var args5="-xml,";
var args6=",-xsl,"
function wisiiRecall()
{
}
function setValues1(){
var filename=document.all.filename.value;
var htmlPrintMode=document.getElementById("htmlPrintMode");
var htmlPrintType=document.getElementById("htmlPrintType");
var htmlPrintFile=document.getElementById("htmlPrintFile");
var htmlPrinterName=document.getElementById("htmlPrinterName");
var htmlbut1=document.getElementById("htmlbut1");
var htmlbut2=document.getElementById("htmlbut2");
var htmlbut3=document.getElementById("htmlbut3");
var sele0=document.forms[0].elements[2];
var select0=sele0.options[sele0.selectedIndex].value;
var sele1=document.forms[0].elements[3];
var select1=sele1.options[sele1.selectedIndex].value;
var sele2=document.forms[0].elements[4];
var select2=sele2.options[sele2.selectedIndex].value;
var sele3=document.forms[0].elements[5];
var select3=sele3.options[sele3.selectedIndex].value;
if(select0 == 0){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="block";
str=",-awt";
if(select1==2){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
if(select2=="pr"){
str="";
str=",-print";
}else
{
str="";
str=",-printSquence";
}
if(select2==4){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="block";
htmlapp.style.display="none";
str="";
str=",-pcl";
}
else if(select2==5){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="block";
htmlapp.style.display="none";
str="";
str=",-ps";
}
}
else if(select1 == 3){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="block";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
str="";
str=",-pcl,Mypcl.pcl"
if(select3==8){
str="";
printerName=""
str=",-pcl,Mypcl.pcl"
}else if(select3==9){
str="";
str=",-ps,Myps.ps"
}else if(select3==10){
str="";
str=",-txt,Mytxt.txt"
}else if(select3==11){
str="";
str=",-png,Mypng.png"
}
}
}else if(select0=="server"){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="block";
str=args2+filename+",-awt";
if(select1==2){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
if(select2=="pr"){
str="";
str=args3+filename+",-print";
}else
{
str="";
str=args3+filename+",-printSquence";
}
if(select2==4){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="block";
htmlapp.style.display="none";
str="";
str=args3+filename+",-pcl";
}
else if(select2==5){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="block";
htmlapp.style.display="none";
str="";
str=args3+filename+",-ps";
}
}
else if(select1 == 3){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="block";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
str="";
str=args3+filename+",-pcl,Mypcl.pcl"
if(select3==8){
str="";
printerName=""
str=args3+filename+",-pcl,Mypcl.pcl"
}else if(select3==9){
str="";
str=args3+filename+",-ps,Myps.ps"
}else if(select3==10){
str="";
str=args3+filename+",-txt,Mytxt.txt"
}else if(select3==11){
str="";
str=args3+filename+",-png,Mypng.png"
}
}
}else{
htmlbut1.style.display="none";
htmlbut2.style.display="none";
htmlbut3.style.display="block";
htmlPrintMode.style.display="none";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
//str="AllBrowseTask,"+xml+filename+".xml"+xsl+filename+".xsl,-awt";
}
}
function client(){
setValues1();
printerName=document.getElementById("printName").value;
var filename=document.all.filename.value;
var printAndClose=document.getElementsByName("printAndClose");
var isPrint=document.getElementsByName("isPrint");
var antialias=document.getElementsByName("antialias");
var isEdit=document.getElementsByName("isEdit");
var percent=document.getElementById("percent").value;
var tool=document.all.tool.value;
var data=document.all.data.value;
if(isPrint[0].checked){
isPrint=",-isPrint,no";
}else{
isPrint="";
}
if(printAndClose[0].checked){
printAndClose=",-printAndClose,no";
}else{
printAndClose="";
}
if(antialias[0].checked){
antialias=",-antialias,yes";
}else{
antialias="";
}
if(isEdit[0].checked){
isEdit=",-editable,yes";
}else{
isEdit="";
}
if(percent==""){
percent=",-percent,100";
}else if(percent<=20){
percent=",-percent,20";
}else if(percent>=500){
percent=",-percent,500";
}else{
percent=",-percent,"+percent;
}
if(tool==""){
tool="";
}else if(tool=="top"){
tool=",-location,top"
}else if(tool=="right"){
tool=",-location,right"
}else if(tool=="left"){
tool=",-location,left"
}else if(tool=="hide"){
tool=",-location,hide"
}
if(data=="servlet"){
data=args4+filename;
}else{
data=args5+filename+".xml"+args6+filename+".xsl";
}
if(printerName==""){
printerName="";
}else{
printerName=","+printerName;
}
str=args1+data+str+printerName+isPrint+printAndClose+antialias+percent+tool+isEdit;
document.applets.TestApplet.askWiApplet(str);
str="";
document.getElementById("printName").value="";
}
function server(){
setValues1();
printerName=document.getElementById("printName").value;
var filename=document.all.filename.value;
var printAndClose=document.getElementsByName("printAndClose");
var isPrint=document.getElementsByName("isPrint");
var antialias=document.getElementsByName("antialias");
var isEdit=document.getElementsByName("isEdit");
var percent=document.getElementById("percent").value;
var tool=document.all.tool.value;
var data=document.all.data.value;
if(isPrint[0].checked){
isPrint=",-isPrint,no";
}else{
isPrint="";
}
if(printAndClose[0].checked){
printAndClose=",-printAndClose,no";
}else{
printAndClose="";
}
if(antialias[0].checked){
antialias=",-antialias,yes";
}else{
antialias="";
}
if(isEdit[0].checked){
isEdit=",-editable,yes";
}else{
isEdit="";
}
if(percent==""){
percent=",-percent,100";
}else if(percent<=20){
percent=",-percent,20";
}else if(percent>=500){
percent=",-percent,500";
}else{
percent=",-percent,"+percent;
}
if(tool==""){
tool=",-location,top";
}else if(tool=="top"){
tool=",-location,top"
}else if(tool=="right"){
tool=",-location,right"
}else if(tool=="left"){
tool=",-location,left"
}else if(tool=="hide"){
tool=",-location,hide"
}
if(data=="servlet"){
data=args4+filename;
}else{
data=args5+filename+".xml"+args6+filename+".xsl";
}
if(printerName==""){
printerName="";
}else{
printerName=","+printerName;
}
str=str+printerName+isPrint+printAndClose+antialias+percent+tool+isEdit;
document.applets.TestApplet.askWiApplet(str);
str="";
document.getElementById("printName").value="";
}
function setFileName(){
setValues1();
}
function openWindow(){
window.open("servlet/Servlet?filename="+document.all.filename.value+"&percent="+document.all.percent.value+"&isPrint="+document.all.isPrint.checked+"&printAndClose="+document.all.printAndClose.checked+"&antialias="+document.all.antialias.checked+"&location="+document.all.tool.value+"&isEdit="+document.all.isEdit.checked);
}
先将需要隐藏的内容写到以下的<div>标签中该标签的属性写成如下格式:
<div id="xxxx" style="display:none;">
</div>
以上代码表示,在div块中的代码将会被隐藏然后再javaScript代码中可写出方法使其显示,代码如下:
<script>
function test(){
var a=document.getElementById("xxx");
a.style.display="block";
}
2级联动表可通过该功能来实现,例:
html代码:<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<link href="./css/main.css" rel="stylesheet" type="text/css" />
</head>
<script src="./js/tool.js"></script>
<link href="./css/bodyStyle.css" rel="stylesheet" type="text/css">
<BODY BGCOLOR="ffffff" TEXT="000000" LINK="FF8000" VLINK="FF8000" Marginwidth=250 marginheight=250 leftmargin=100>
<table><tr align=center width='100%'><td colspan="2"><font size="6" color="#0000FF">Wdems示例展示首页</td><tr></table>
<jsp:include flush="true" page="test.jsp"></jsp:include>
<form name="form2">
<div id="frames">
<fieldset>
<legend>打印参数设置</legend>
<select name ="filename" onClick="setFileName()">
<option value="pass_goods_in">pass_goods_in</option>
<option value="DATE_and_HIDDEN_and_LIST_test_editmode_3">DATE_and_HIDDEN_and_LIST_test_editmode_3</option>
<option value="real">real</option>
<option value="TCertG21_0003">TCertG21_0003</option>
<option value="PICC">PICC</option>
<option value="AD_CONTRACT">AD_CONTRACT</option>
<option value="ecrPrnt">ecrPrnt</option>
<option value="test_use">test_use</option>
<option value="code128">code128</option>
<option value="stat">stat</option>
<option value="stat1">stat1</option>
<option value="CERT_B">FORMB</option>
<option value="FORM_P">FORM_P</option>
<option value="pass_goods_in">pass_goods_in</option>
<option value="goods_out">goods_out</option>
<option value="pass_goods_out">pass_goods_out</option>
<option value="chonfu_test">chonfu_test</option>
<option value="nine">九城表单测试</option>
<option value="FO-Element-test">FO元素和属性测试</option>
<option value="schemaobj_test">schemaobj_test</option>
<option value="font_text">font_text</option>
<option value="xialaliebiao_text">xialaliebiao_text</option>
<option value="riqi_text">riqi_text</option>
<option value="xialaliebiaowenti_text">xialaliebiaowenti_text</option>
<option value="riqiwenti_text">riqiwenti_text</option>
<option value="font_text2">font_text2</option>
<option value="baoxian">baoxian</option>
</select>
<TABLE width="700" height="40" BORDER=0 CELLPADDING=0 CELLSPACING=0>
<tr width="200">
<td width="150">
<select id="sle0" name="sle0" onClick="setValues1()">
<option value="change">请选择数据处理方式</option>
<option value="server">服务器端解析数据</option>
<option value="0">统一客户端</option>
</select>
</td>
<td width="150">
<div id="htmlPrintMode" style="display:none;">
<table>
<select id="sle1"name="sle1" onClick="setValues1()">
<option>前台显示</option>
<option value="2">后台打印</option>
<option value="3">生成文件</option>
</select>
</table>
</div>
</td>
<td width="20">
<div id="htmlPrintType" style="display:none;">
<table>
<select id="sle2" name="sle2" onClick="setValues1()">
<option >分组打印</option>
<option value="pr">打印</option>
<option value="4">打印PCL文件</option>
<option value="5">打印PS文件</option>
</select>
</table>
</div>
</td>
<td width="150">
<div id="htmlPrintFile" style="display:none;">
<table>
<select id="sle3" name="sle3" onClick="setValues1()">
<option value="8">生成PCL文件</option>
<option value="9">生成PS文件</option>
<option value="10">生成TXT文件</option>
<option value="11">生成png文件</option>
</select>
</table>
</div>
</td>
<td width="400">
<div id="htmlPrinterName" style="display:none;">
<table>请输入打印机名称<input type="text" id="printName" name="printName" value=""/></table>
</div>
</td>
</tr>
<tr align="right">隐藏打印并关闭按钮<input type="checkbox" id="printAndClose" name="printAndClose" value="no" ></tr>
<tr>不允许打印<input type="checkbox" id="isPrint" name="isPrint" value="no"></tr>
<tr>使用平滑处理<input type="checkbox" id="antialias" name="antialias" value="yes"></tr>
<tr>可进行编辑<input type="checkbox" id="isEdit" name="isEdit" value="yes"></tr>
<tr>工具栏位置<select name="tool" id="tool" value="">
<option value="top">top</option>
<option value="left">left</option>
<option value="right">right</option>
<option value="hide">hide</option>
</select>
</tr>
<tr>显示比例测试<input type="text" name="percent" id="percent"></tr>
</table>
<div id="htmlbut1" style="display:none;">
数据读取方式 <select name="data" id="data" value="">
<option value="readFile">直接读取文件</option>
<option value="servlet">通过Servlet读取文件</option>
</select>
<br><br><input type="button" value="Test" onClick="client()"/>
</div>
<div id="htmlbut2" style="display:none;">
<input type="button" value="Test" onClick="server()"/>
</div>
<div id="htmlbut3" style="display:none;">
<input type="button" value="提交" onClick="openWindow()"/>
</div>
</div>
</form>
<div id="htmlapp" style="display:none;">
<jsp:include page="/wisii/jsp/init.jsp" flush="true" />
</div>
</body>
</html>
javaScipt代码:
var str="";
var args1="AllBrowseTask,";
var args4="-servlet,/servlet/AllClientServlet?filename=";
var args2="frontServletTask,servlet/ClientfrontServlet?filename=";
var args3="BackServletTask,servlet/ClientfrontServlet?filename=";
var args5="-xml,";
var args6=",-xsl,"
function wisiiRecall()
{
}
function setValues1(){
var filename=document.all.filename.value;
var htmlPrintMode=document.getElementById("htmlPrintMode");
var htmlPrintType=document.getElementById("htmlPrintType");
var htmlPrintFile=document.getElementById("htmlPrintFile");
var htmlPrinterName=document.getElementById("htmlPrinterName");
var htmlbut1=document.getElementById("htmlbut1");
var htmlbut2=document.getElementById("htmlbut2");
var htmlbut3=document.getElementById("htmlbut3");
var sele0=document.forms[0].elements[2];
var select0=sele0.options[sele0.selectedIndex].value;
var sele1=document.forms[0].elements[3];
var select1=sele1.options[sele1.selectedIndex].value;
var sele2=document.forms[0].elements[4];
var select2=sele2.options[sele2.selectedIndex].value;
var sele3=document.forms[0].elements[5];
var select3=sele3.options[sele3.selectedIndex].value;
if(select0 == 0){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="block";
str=",-awt";
if(select1==2){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
if(select2=="pr"){
str="";
str=",-print";
}else
{
str="";
str=",-printSquence";
}
if(select2==4){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="block";
htmlapp.style.display="none";
str="";
str=",-pcl";
}
else if(select2==5){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="block";
htmlapp.style.display="none";
str="";
str=",-ps";
}
}
else if(select1 == 3){
htmlbut1.style.display="block"
htmlbut2.style.display="none";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="block";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
str="";
str=",-pcl,Mypcl.pcl"
if(select3==8){
str="";
printerName=""
str=",-pcl,Mypcl.pcl"
}else if(select3==9){
str="";
str=",-ps,Myps.ps"
}else if(select3==10){
str="";
str=",-txt,Mytxt.txt"
}else if(select3==11){
str="";
str=",-png,Mypng.png"
}
}
}else if(select0=="server"){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="block";
str=args2+filename+",-awt";
if(select1==2){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
if(select2=="pr"){
str="";
str=args3+filename+",-print";
}else
{
str="";
str=args3+filename+",-printSquence";
}
if(select2==4){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="block";
htmlapp.style.display="none";
str="";
str=args3+filename+",-pcl";
}
else if(select2==5){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="block";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="block";
htmlapp.style.display="none";
str="";
str=args3+filename+",-ps";
}
}
else if(select1 == 3){
htmlbut1.style.display="none"
htmlbut2.style.display="block";
htmlbut3.style.display="none";
htmlPrintMode.style.display="block";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="block";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
str="";
str=args3+filename+",-pcl,Mypcl.pcl"
if(select3==8){
str="";
printerName=""
str=args3+filename+",-pcl,Mypcl.pcl"
}else if(select3==9){
str="";
str=args3+filename+",-ps,Myps.ps"
}else if(select3==10){
str="";
str=args3+filename+",-txt,Mytxt.txt"
}else if(select3==11){
str="";
str=args3+filename+",-png,Mypng.png"
}
}
}else{
htmlbut1.style.display="none";
htmlbut2.style.display="none";
htmlbut3.style.display="block";
htmlPrintMode.style.display="none";
htmlPrintType.style.display="none";
htmlPrintFile.style.display="none";
htmlPrinterName.style.display="none";
htmlapp.style.display="none";
//str="AllBrowseTask,"+xml+filename+".xml"+xsl+filename+".xsl,-awt";
}
}
function client(){
setValues1();
printerName=document.getElementById("printName").value;
var filename=document.all.filename.value;
var printAndClose=document.getElementsByName("printAndClose");
var isPrint=document.getElementsByName("isPrint");
var antialias=document.getElementsByName("antialias");
var isEdit=document.getElementsByName("isEdit");
var percent=document.getElementById("percent").value;
var tool=document.all.tool.value;
var data=document.all.data.value;
if(isPrint[0].checked){
isPrint=",-isPrint,no";
}else{
isPrint="";
}
if(printAndClose[0].checked){
printAndClose=",-printAndClose,no";
}else{
printAndClose="";
}
if(antialias[0].checked){
antialias=",-antialias,yes";
}else{
antialias="";
}
if(isEdit[0].checked){
isEdit=",-editable,yes";
}else{
isEdit="";
}
if(percent==""){
percent=",-percent,100";
}else if(percent<=20){
percent=",-percent,20";
}else if(percent>=500){
percent=",-percent,500";
}else{
percent=",-percent,"+percent;
}
if(tool==""){
tool="";
}else if(tool=="top"){
tool=",-location,top"
}else if(tool=="right"){
tool=",-location,right"
}else if(tool=="left"){
tool=",-location,left"
}else if(tool=="hide"){
tool=",-location,hide"
}
if(data=="servlet"){
data=args4+filename;
}else{
data=args5+filename+".xml"+args6+filename+".xsl";
}
if(printerName==""){
printerName="";
}else{
printerName=","+printerName;
}
str=args1+data+str+printerName+isPrint+printAndClose+antialias+percent+tool+isEdit;
document.applets.TestApplet.askWiApplet(str);
str="";
document.getElementById("printName").value="";
}
function server(){
setValues1();
printerName=document.getElementById("printName").value;
var filename=document.all.filename.value;
var printAndClose=document.getElementsByName("printAndClose");
var isPrint=document.getElementsByName("isPrint");
var antialias=document.getElementsByName("antialias");
var isEdit=document.getElementsByName("isEdit");
var percent=document.getElementById("percent").value;
var tool=document.all.tool.value;
var data=document.all.data.value;
if(isPrint[0].checked){
isPrint=",-isPrint,no";
}else{
isPrint="";
}
if(printAndClose[0].checked){
printAndClose=",-printAndClose,no";
}else{
printAndClose="";
}
if(antialias[0].checked){
antialias=",-antialias,yes";
}else{
antialias="";
}
if(isEdit[0].checked){
isEdit=",-editable,yes";
}else{
isEdit="";
}
if(percent==""){
percent=",-percent,100";
}else if(percent<=20){
percent=",-percent,20";
}else if(percent>=500){
percent=",-percent,500";
}else{
percent=",-percent,"+percent;
}
if(tool==""){
tool=",-location,top";
}else if(tool=="top"){
tool=",-location,top"
}else if(tool=="right"){
tool=",-location,right"
}else if(tool=="left"){
tool=",-location,left"
}else if(tool=="hide"){
tool=",-location,hide"
}
if(data=="servlet"){
data=args4+filename;
}else{
data=args5+filename+".xml"+args6+filename+".xsl";
}
if(printerName==""){
printerName="";
}else{
printerName=","+printerName;
}
str=str+printerName+isPrint+printAndClose+antialias+percent+tool+isEdit;
document.applets.TestApplet.askWiApplet(str);
str="";
document.getElementById("printName").value="";
}
function setFileName(){
setValues1();
}
function openWindow(){
window.open("servlet/Servlet?filename="+document.all.filename.value+"&percent="+document.all.percent.value+"&isPrint="+document.all.isPrint.checked+"&printAndClose="+document.all.printAndClose.checked+"&antialias="+document.all.antialias.checked+"&location="+document.all.tool.value+"&isEdit="+document.all.isEdit.checked);
}
相关推荐
4. 响应式设计:考虑到移动端的屏幕尺寸差异,需要确保三级联动组件在不同设备上都能正常显示和使用。利用媒体查询(`@media`)和Flexbox或Grid布局,我们可以实现自适应的界面设计。 5. 兼容性考虑:虽然HTML5的大...
中文 | Englishvue-picker的组件,囊括了(普通选择、联动选择、中国地址选择)等常见的选取器,兼容PC、移动端,通过简单配置就可以出现一个强大的选取器,感受下效果图。Demo(快点去复制代码体验一波吧)...
vue-picker的组件,囊括了(普通选择、联动选择、中国地址选择)等等常见的picker,兼容PC、移动端,通过简单配置就可以出现一个强大的picker,感受下效果图。 Demo(快点去复制代码体验一波吧) Install npm install ...
CSS(层叠样式表)用于定义元素的外观和布局,包括蓝色修边的样式以及渐变效果。修边通常指的是在元素边缘添加圆润或者特定形状的边框,以增加视觉吸引力。蓝色作为一种专业且友好的颜色,常用于网页设计中,为用户...
稳压罐sw16_三维3D设计图纸_包括零件图_机械3D图可修改打包下载_三维3D设计图纸_包括零件图_机械3D图可修改打包下载.zip
内容概要:本文详细介绍了利用递推最小二乘法(RLS)进行永磁同步电机参数辨识的方法及其MATLAB仿真过程。首先解释了RLS算法的优势,如不需要概率模型、计算量适中以及适用于嵌入式系统的实时参数更新。接着展示了将电机电压方程转换为标准形式Y=φθ的具体步骤,并提供了核心的RLS迭代代码。文中还讨论了仿真过程中的一些关键技术细节,如遗忘因子的选择、协方差矩阵的初始化和更新方式、电流信号的处理方法等。最终给出了仿真结果,显示电阻和电感的辨识误差分别达到了0.08%和0.12%,并指出了实际应用中需要注意的数据同步和数值稳定性问题。 适合人群:从事电机控制研究的技术人员、研究生及以上学历的学生。 使用场景及目标:①帮助研究人员理解和掌握RLS算法在电机参数辨识中的应用;②提供详细的仿真代码和配置建议,便于快速搭建实验环境;③指导如何优化算法性能,提高参数辨识精度。 其他说明:本文不仅涵盖了理论推导,还包括了大量的实践经验分享和技术细节探讨,有助于读者全面理解RLS算法的实际应用。同时,文中提到的仿真方案可以方便地移植到DSP平台,进一步扩展了其实用价值。
零起点Python大数据与量化交易
管道清污机器人sw16可编辑_三维3D设计图纸_包括零件图_机械3D图可修改打包下载_三维3D设计图纸_包括零件图_机械3D图可修改打包下载.zip
电子仿真教程,从基础到精通,每个压缩包15篇教程,每篇教程5000字以上。
电子仿真教程,从基础到精通,每个压缩包15篇教程,每篇教程5000字以上。
1、文件说明: Centos8操作系统thai-scalable-garuda-fonts-0.6.5-1.el8.rpm以及相关依赖,全打包为一个tar.gz压缩包 2、安装指令: #Step1、解压 tar -zxvf thai-scalable-garuda-fonts-0.6.5-1.el8.tar.gz #Step2、进入解压后的目录,执行安装 sudo rpm -ivh *.rpm
内容概要:本文详细介绍了利用ABAQUS进行滑坡和沉降对埋地管道影响的有限元分析方法。主要内容涵盖了几何建模、材料属性定义、接触设置、边界条件与加载等方面的技术细节。通过具体的Python脚本示例展示了如何构建模型,并深入探讨了滑坡和沉降条件下管道的应力、应变分布及其潜在破坏机制。此外,还分享了一些实战经验和优化技巧,如材料模型选择、接触条件设置、边界条件处理等,强调了这些因素对结果准确性的重要影响。 适合人群:从事地下管道工程设计、施工及维护的专业技术人员,尤其是那些希望深入了解滑坡和沉降对管道影响的研究人员和技术专家。 使用场景及目标:适用于评估和预测滑坡和沉降对埋地管道造成的力学响应,帮助工程师们更好地理解和应对复杂的地质灾害环境,从而提高管道系统的安全性与稳定性。 其他说明:文中提供的Python代码片段仅为示意,具体实施时需结合ABAQUS的实际接口和项目需求进行适当调整。同时,对于大规模模型的计算,建议使用高性能计算资源以确保效率和精度。
Java一天面试突击,迅速掌握Java常见面试题
莲子去壳机设计模型SW10_三维3D设计图纸_包括零件图_机械3D图可修改打包下载_三维3D设计图纸_包括零件图_机械3D图可修改打包下载.zip
MFRC-522+RC522+RFID射频+IC卡感应模块
内容概要:《学术研究提示设计 50 招》是一份详尽的指南,旨在帮助研究人员提高学术写作和研究效率。该文档涵盖了从论文撰写、润色、翻译、查重降重、参考文献管理、投稿审稿到文献阅读等多个方面的具体操作指令。每一章节均针对特定任务提供了详细的步骤和注意事项,例如如何撰写标题、摘要、致谢,如何进行英文润色、中英翻译,以及如何优化逻辑结构等。文档还介绍了如何利用AI工具进行文献分析、术语表提取和研究方向探索等内容,为研究者提供了全面的支持。 适合人群:适用于学术研究人员,特别是那些需要撰写、润色和提交学术论文的研究者,包括研究生、博士生及高校教师等。 使用场景及目标:① 提供一系列具体的指令,帮助研究者高效完成论文的各个部分,如撰写标题、摘要、致谢等;② 提供润色和翻译的详细指导,确保论文语言的准确性和专业性;③ 提供查重降重的方法,确保论文的原创性;④ 提供参考文献管理和投稿审稿的指导,帮助研究者顺利发表论文;⑤ 利用AI工具进行文献分析、术语表提取和研究方向探索,提高研究效率。 阅读建议:此资源不仅提供了具体的指令和方法,更重要的是引导研究者如何思考和解决问题。因此,在学习过程中,不仅要关注具体的步骤,还要理解背后的原理和逻辑,结合实际案例进行实践和反思。
项目optionc-20250409
2023年c语言程序设计基本概念考点归纳.doc
电子仿真教程,从基础到精通,每个压缩包15篇教程,每篇教程5000字以上。
内容概要:本文详细介绍了使用Matlab进行模拟和数字滤波器设计的方法,涵盖了巴特沃斯、切比雪夫等多种经典滤波器类型。首先讲解了模拟滤波器的设计,如巴特沃斯滤波器的通带平坦性和切比雪夫滤波器的通带波纹特性,并提供了具体的代码示例。接着讨论了数字滤波器的设计,包括IIR滤波器的递归特性和FIR滤波器的线性相位特性,同样附有详细的代码实现。文中还特别强调了不同类型滤波器之间的转换方法以及设计过程中常见的注意事项,如频率归一化、阶数选择等。最后推荐了一些实用的Matlab工具,如fvtool和FDATool,帮助用户更直观地理解和调试滤波器设计。 适合人群:具有一定信号处理基础和技术背景的研究人员、工程师及学生。 使用场景及目标:适用于需要进行滤波器设计的实际工程应用,如通信系统、音频处理等领域。目标是让读者掌握滤波器设计的基本原理和具体实现方法,能够独立完成滤波器的设计和调试。 其他说明:文章不仅提供了理论知识,还通过大量实例代码帮助读者更好地理解和应用所学内容。建议读者在实践中多尝试不同的参数配置,以加深对滤波器特性的理解。