bean:include

本文详细介绍了Struts框架中Bean:Include标签的使用方法,包括如何将一个JSP页面定义为Bean,以及如何通过不同方式输出Bean内容。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 bean:include标签不同于JSP里的<jsp:include>之处是此把把包含内容放在一个变量,用时取出

对指定url(由forward、href或page确定)处的资源做一个请求,将响应数据作为一个String类型的bean绑定到page作用域,同时创建一个scripting变量。我们可以通过id值访问它们。

下面的代码片段示例了bean:include标签的用法,其中include.txt文件包含要include的内容,然后将这些内容输出:

<bean:include id="value" page="/include.txt"/>
<!-- 其它标签通过绑定到page作用域中的属性使用该值 -->
<bean:write name="value"/><br/>
<!-- JSP脚本通过scripting变量使用该值 -->
<%
  out.println(value);
%>

(二)

将一个完整的JSP页面定义成beano 用法如下:

<bean:include id="beanName" page="uri" I>:将uri对应的JSP资源定义成beanName的bean"看下面的JSP页面:

%@pagecontentType="text/html;charset=gb2312"%
%@taglib uri="/WEB-INF/struts-bean.tld"prefix="bean" %〉
<html><head>
<title>测试 bean:include 标签</title>
</head>
bean:include主要用来寻|入另外一个页面
<body>
<div align="center">
<hl>测试bean:include标签</hl>
</div><!--将 bean-header.jsp页面的定义成head的 bean-->
<bea且 :include id="head"page="/bean-header.jsp" />
<hr/><pre>
下面的内容是通过=header输出<br>
〈%= head %〉
<br>
<hr>
下面的内容是filter="false"的输出<br>
<bean:write name="head" filter="false"/>
<br>
<hr>
下面的内容是filter:::::lltrue"的输出<br>
<pre>
<bea口 :writename="head" filter="true"/></pre>
<hr/></body>
</html>

注意:当<bean:write/>标签后的filter为 true 时,将输出被包含页面的源代码。JSP 页面使用bean:include将 bean-header.jsp资源定义成标准bean,然后采用了三种方式输出该bean。程序的运行效果如图3.15 所示。

图 3.15 bean:inc1ude 的运行效果

图 3.16 中第一个红色标记的内容来自 bean-inc1ude.jsp 页面:而第二个红色标记的内容则来自 bean-header.jsp 页面。

资源引用:

http://book.51cto.com/art/200808/86227.htm

<%@ page contentType="text/html; charset=UTF-8"%> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <%@ taglib uri="/WEB-INF/app.tld" prefix="app"%> <%@page import="java.util.List"%> <input name="productBlockId" type="hidden" value="ItemEngineeringKind"> <input name="riskCode" type="hidden" value="<%=request.getAttribute("riskCode")%>"> <input name="planCode" type="hidden" value="<%=request.getAttribute("planCode")%>"> <input name="itemNo" type="hidden" value="<%=request.getAttribute("itemNo")%>"> <input name="maxGuItemKindItemKindNo" type="hidden" value="<%=request.getAttribute("maxItemKindNo")%>" /> <input name="maxGuKindLimitSerialNo" type="hidden" value="<%=request.getAttribute("maxGuKindLimitSerialNo")%>" /> <input name="maxGuKindDeductibleDeductibleNo" type="hidden" value="<%=request.getAttribute("maxGuKindDeductibleDeductibleNo")%>" /> <input type="hidden" name="judgLimitToSumInsured" value="1" /> <jsp:include page="/prpall/plugin/common/riskclass/99/thirdAndMainKind/ItemEngineeringKind_Data.jsp"/> <jsp:include page="/prpall/plugin/common/riskclass/07/itemengineering/ThirdKindLimitKind_Data.jsp" /> <jsp:include page="/prpall/plugin/common/riskclass/07/itemengineering/SubKindLimitKind_Data.jsp" /> <jsp:include page="/prpall/plugin/common/riskclass/07/itemengineering/ItemEngineeringLimit_Data.jsp" /> <script type="text/javascript"> var GuKindLimitLimitA ="<bean:message key="GuKindLimitDto.LimitLimit"/>"; </script> <!-- 物质损失 --> <input name="SubOrThirdFlag" type="hidden" value = "0"> <table id="ItemKind" name="ItemKind" class="common" cellpadding="1" cellspacing="1" border="0"> <thead> <tr style="display: none"> <td width="18%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="12%" align="center"> </td> <td width="12%" align="center"> </td> <td width="13%" align="center"> </td> </tr> <tr class="top01"> <td align="left" colspan="9"><strong><bean:message key="GuItemKindDto.kindName" /></strong></td> </tr> <tr> <!-- 机身损失 --> <td class="left" colspan="9"><strong> <bean:message key="prompt.materialFuselageLoss"/> <%-- 第一部分:机身损失--%> </strong></td> </tr> <tr> <td width="18%" class="white" align="center"><bean:message key="GuItemKindDto.itemCode" /> <font color="red">*</font></td> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.numberSumInsured"/> <font color="red">*</font></td> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.sumInsured" /> <font color="red">*</font></td> <logic:equal name='ggRiskDto' property='calculator' value='100'> <TD class="white" align="center" width="9%"><bean:message key="GuItemKindDto.rate"/>(%) <font color="red">*</font></TD> </logic:equal> <logic:notEqual name='ggRiskDto' property='calculator' value='100'> <TD class="white" align="center" width="9%"><bean:message key="GuItemKindDto.rate"/>(‰) <font color="red">*</font></TD> </logic:notEqual> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.shortRateFlag" /> <font color="red">*</font></td> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.shortRate" /></td> <td width="12%" class="white" align="center"><bean:message key="GuItemKindDto.uwPremium" /></td> <td width="12%" class="white" align="center"><bean:message key="GuItemKindDto.grossPremium" /> <font color="red">*</font></td> <td width="13%" class="white" align="center"></td> </tr> </thead> <tbody> <bean:size id="listMainItemLength" name="guItemKindMainList" /> <% List guItemKindDtoList = (List) request.getAttribute("guItemKindMainList"); if (guItemKindDtoList != null) { int lengthList = guItemKindDtoList.size(); for (int index = 0; index < lengthList; index++) { request.setAttribute("guItemKindDto", guItemKindDtoList.get(index)); %> <logic:notEmpty name = "guItemKindDto" property="itemDetailCode"> <logic:equal parameter="businessType" value="Endor"> <bean:define name="guItemKindDto" property="guPolicyItemKindDto" id="guPolicyItemKindDto" /> </logic:equal> <tr> <td class="white"> <input name="GuItemKindFlag" type="hidden" endorFlag="B" value="<bean:write name='guItemKindDto' property='flag'/>" title="<bean:write name='guPolicyItemKindDto' property='flag'/>" > <input name="GuItemKindProjectCode" type="hidden" value="<bean:write name='guItemKindDto' property='projectCode'/>"> <logic:present name="guItemKindDto" property="subProposalNo"> <input name="GuItemKindSubProposalNo" type="hidden" value="<bean:write name='guItemKindDto' property='subProposalNo'/>"> </logic:present> <logic:present name="guItemKindDto" property="countFlag"> <logic:notEqual name="guItemKindDto" property="countFlag" value="0"> <input name="GuItemKindCountFlag" type="hidden" value="<bean:write name='guItemKindDto' property='countFlag'/>"> </logic:notEqual> </logic:present> <input name="GuItemKindSurrenderInd" type="hidden" value="0"> <input name="GuItemKindItemNo" type="hidden" value="<%=request.getAttribute("itemNo")%>"> <input name="GuItemKindItemDetailNo" type="hidden" value="<bean:write name='guItemKindDto' property='itemDetailNo'/>"> <input name="GuItemKindKindCode" type="hidden" value="<bean:write name='guItemKindDto' property='kindCode'/>"> <input name="GuItemKindKindName" type="hidden" value="<bean:write name='guItemKindDto' property='kindName'/>"> <input name="GuItemKindPlanCode" type="hidden" value="<bean:write name='guItemKindDto' property='planCode'/>"> <input name="GuItemKindRiskCode" type="hidden" value="<bean:write name='guItemKindDto' property='riskCode'/>"> <input name="GuItemKindCompanyCode" type="hidden" value="<%=request.getAttribute("companyCode")%>"> <input name="GuItemKindItemCode" type="hidden" value="<bean:write name='guItemKindDto' property='itemCode'/>"> <input name="GuItemKindStartDate" type="hidden" value="<bean:write name='guItemKindDto' property='startDate'/>" title="<bean:write name='guPolicyItemKindDto' property='startDate'/>"> <input name="GuItemKindEndDate" type="hidden" value="<bean:write name='guItemKindDto' property='endDate'/>" title="<bean:write name='guPolicyItemKindDto' property='endDate'/>"> <input name="GuItemKindCurrency" type="hidden" value="<bean:write name='guItemKindDto' property='currency'/>" title="<bean:write name='guPolicyItemKindDto' property='currency'/>" > <input name="GuItemKindItemKindNo" type="hidden" title="<bean:write name='guItemKindDto' property='itemKindNo'/>" value="<bean:write name='guItemKindDto' property='itemKindNo'/>"> <input name="GuItemKindReSpecialInd" type="hidden" value="<bean:write name='guItemKindDto' property='reSpecialInd'/>"> <input name="GuItemKindItemDetailCode" class="codecode" type="text" style="width: 30%" title="<bean:write name='guPolicyItemKindDto' property='itemDetailCode'/>" value="<bean:write name='guItemKindDto' property='itemDetailCode'/>" ondblclick="getField(this, 'ItemKind', '<bean:message key='alert.message.sameItemDetailCode' />');code_CodeSelect(this,'itemDetailCodeByRiskCode','0,1,1,3,4,8,9','Y','riskCode=<%=request.getAttribute("riskCode")%>','setGuItemKindItemDetailCodeOnchange();');" onkeyup="getField(this, 'ItemKind', '<bean:message key='alert.message.sameItemDetailCode' />');code_CodeSelect(this,'itemDetailCodeByRiskCode','0,1,1,3,4,8,9','Y','riskCode=<%=request.getAttribute("riskCode")%>','setGuItemKindItemDetailCodeOnchange();');" onchange="getField(this, 'ItemKind', '<bean:message key='alert.message.sameItemDetailCode' />');code_CodeChange(this,'itemDetailCodeByRiskCode','0,1,1,3,4,8,9','Y','riskCode=<%=request.getAttribute("riskCode")%>','setGuItemKindItemDetailCodeOnchange();');"> <input name="GuItemKindItemDetailList" class="codename" type="text" style="width: 65%" title="<bean:write name='guPolicyItemKindDto' property='itemDetailList'/>" value="<bean:write name='guItemKindDto' property='itemDetailList'/>"> <input name="GuItemKindKindInd" type="hidden" value="<bean:write name='guItemKindDto' property='kindInd'/>"> </td> <td class="white"> <input name="GuItemKindCalculateInd" class="codecode" type="text" style="width:30%" title="<bean:write name='guPolicyItemKindDto' property='calculateInd'/>" value="<bean:write name='guItemKindDto' property='calculateInd'/>" ondblclick="getField(this,'ItemKind');code_CodeSelect(this,'calculateInd','0,1','Y','02,CalculateInd','setGuItemKindCalculateIndOnchange();');" onkeyup="getField(this,'ItemKind');code_CodeSelect(this,'calculateInd','0,1','Y','02,CalculateInd','setGuItemKindCalculateIndOnchange();');" onchange="getField(this,'ItemKind');code_CodeChange(this,'calculateInd','0,1','Y','02,CalculateInd','setGuItemKindCalculateIndOnchange();');"> <input name="GuItemKindCalculateIndName" class="readonly" type="text" style="width:65%" readonly title="<app:localeName name="guPolicyItemKindDto" property="calculateInd,CalculateInd" codeType="ggCodeCodeName" filter="true" />" value="<app:localeName name="guItemKindDto" property="calculateInd,CalculateInd" codeType="ggCodeCodeName" filter="true" />"> </td> <td class="white"> <input name="GuItemKindSumInsured" class="common01" type="text" style="width: 100%" title="<bean:write name='guPolicyItemKindDto' property='sumInsured'/>" value="<bean:write name='guItemKindDto' property='sumInsured'/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','')"> </td> <td class="white"> <input name="GuItemKindRate" class="common01" type="text" style="width: 100%" title="<bean:write name='guPolicyItemKindDto' property='rate' format="#,##0.000000"/>" value="<bean:write name='guItemKindDto' property='rate' format="#,##0.000000"/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','')"> <input name="GuCalculator" type="hidden" value="100"> </td> <td class="white"> <input name="GuItemKindShortRateFlag" class="codecode" type="text" style="width: 30%" title="<bean:write name='guPolicyItemKindDto' property='shortRateFlag'/>" value="<bean:write name='guItemKindDto' property='shortRateFlag'/>" ondblclick="getField(this, 'ItemKind', '<bean:message key="alert.message.kindcodeMustInput"/>', '<bean:message key="alert.message.zeroError"/>');code_CodeSelect(this,'shortRateFlag','0,1','Y','02,ShortRateFlag','changeGuItemKindShortRateFlag();');" onkeyup="getField(this, 'ItemKind', '<bean:message key="alert.message.kindcodeMustInput"/>', '<bean:message key="alert.message.zeroError"/>');code_CodeSelect(this,'shortRateFlag','0,1','Y','02,ShortRateFlag','changeGuItemKindShortRateFlag();');" onchange="getField(this, 'ItemKind', '<bean:message key="alert.message.kindcodeMustInput"/>', '<bean:message key="alert.message.zeroError"/>');code_CodeChange(this,'shortRateFlag','0,1','Y','02,ShortRateFlag','changeGuItemKindShortRateFlag();');"> <input name="GuItemKindShortRateFlagName" class="readonly" type="text" style="width: 65%" readonly title="<app:localeName name="guItemKindDto" property="shortRateFlag,ShortRateFlag" codeType="ggCodeCodeName" filter="true" />" value="<app:localeName name="guItemKindDto" property="shortRateFlag,ShortRateFlag" codeType="ggCodeCodeName" filter="true" />"> </td> <td class="white"> <input name="GuItemKindShortRate" type="hidden" value="<bean:write name='guItemKindDto' property='shortRate' format="0.00"/>" title="<bean:write name='guPolicyItemKindDto' property='shortRate' format="0.00"/>"> <input name="GuItemKindShortRateNumerator" class="common01" readonly="readonly" type="text" style="width: 42%" value="<bean:write name='guItemKindDto' property='shortRateNumerator' format="#"/>" title="<bean:write name='guPolicyItemKindDto' property='shortRateNumerator' format="#"/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','')">/ <input name="GuItemKindShortRateDenominator" class="common01" readonly="readonly" type="text" style="width: 42%" value="<bean:write name='guItemKindDto' property='shortRateDenominator'/>" title="<bean:write name='guPolicyItemKindDto' property='shortRateDenominator'/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','')"> </td> <td class="white"> <input name="GuItemKindUwPremium" class="readonly" type="text" style="width:100%" readonly title="<bean:write name='guPolicyItemKindDto' property='uwPremium'/>" value="<bean:write name='guItemKindDto' property='uwPremium'/>" onchange=" "> <input name="GuItemKindOriginUWPremium" class="common01" type="hidden" style="width: 100%" value="<bean:write name='guItemKindDto' property='originUWPremium'/>"> </td> <td class="white"> <input name="GuItemKindGrossPremium" class="common" type="text" style="width: 100%" title="<bean:write name='guPolicyItemKindDto' property='grossPremium'/>" value="<bean:write name='guItemKindDto' property='grossPremium'/>" onchange=" "> <input name="GuItemKindOriginGrossPremium" class="common01" type="hidden" value="<bean:write name='guItemKindDto' property='originGrossPremium'/>"> </td> <td class="white" align="center"> <INPUT name="button_ItemKind_Delete" class="smallbutton" type="button" value="<bean:message key="button.delete"/>" ind="ind" onclick="deleteRowInTable(this,'ItemKind','1',1);afterEndorDeleteItemKind(this, '');"> </td> </tr> </logic:notEmpty> <% } } %> </tbody> <tfoot> <TR> <TD class="title02" colspan="9"> <P align="left"><input name="button_ItemKind_Insert" class="button" type="button" style="cursor:hand" ind="ind" value="<bean:message key='button.add'/>" onclick="insertRowInTable(this,'ItemKind',1);"> </P> </TD> </TR> </tfoot> </table> <!-- 特种风险赔偿限额 --> <logic:notEqual name='ggRiskDto' property='riskCode' value='9929'> <jsp:include page="/prpall/plugin/common/riskclass/07/itemengineering/ItemEngineeringLimit.jsp" /> </logic:notEqual> <!-- 第三者责任 --> <table id="ItemKindThird" name="ItemKindThird" class="common" cellpadding="1" cellspacing="1"> <thead> <tr style="display: none"> <td width="18%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="12%" align="center"> </td> <td width="12%" align="center"> </td> <td width="13%" align="center"> </td> </tr> <tr> <td class="left" colspan="9"><strong><bean:message key="prompt.thirdPartyLibility2"/></strong></td> </tr> <tr> <td width="18%" class="white" align="center"><bean:message key="GuItemKindDto.kindCode" /> <font color="red">*</font></td> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.numberSumInsured"/> <font color="red">*</font></td> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.thirdSumInsured" /> <font color="red">*</font></td> <logic:equal name='ggRiskDto' property='calculator' value='100'> <TD class="white" align="center" width="9%"><bean:message key="GuItemKindDto.rate"/>(%) <font color="red">*</font></TD> </logic:equal> <logic:notEqual name='ggRiskDto' property='calculator' value='100'> <TD class="white" align="center" width="9%"><bean:message key="GuItemKindDto.rate"/>(‰) <font color="red">*</font></TD> </logic:notEqual> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.shortRateFlag" /> <font color="red">*</font></td> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.shortRate" /></td> <td width="12%" class="white" align="center"><bean:message key="GuItemKindDto.uwPremium" /></td> <td width="12%" class="white" align="center"><bean:message key="GuItemKindDto.grossPremium" /> <font color="red">*</font></td> <td width="13%" class="white" align="center"></td> </tr> </thead> <tbody> <% List guThirdItemKindDtoList = (List) request.getAttribute("guItemKindThirdList"); if (guThirdItemKindDtoList != null) { int lengthThirdList = guThirdItemKindDtoList.size(); for (int index = 0; index < lengthThirdList; index++) { request.setAttribute("guThirdItemKindDto", guThirdItemKindDtoList.get(index)); %> <logic:notEmpty name = "guThirdItemKindDto" property="sumInsured"> <logic:equal parameter="businessType" value="Endor"> <bean:define name="guThirdItemKindDto" property="guPolicyItemKindDto" id="thirdGuPolicyItemKindDto" /> </logic:equal> <tr> <td class="white"> <input name="ThirdGuItemKindFlag" type="hidden" endorFlag="B" value="<bean:write name='guThirdItemKindDto' property='flag'/>" title="<bean:write name='thirdGuPolicyItemKindDto' property='flag'/>"> <input name="ThirdGuItemKindProjectCode" type="hidden" value="<bean:write name='guThirdItemKindDto' property='projectCode'/>"> <input name="ThirdGuItemKindKindCode" class="codecode" type="text" style="width: 30%" readonly title="<bean:write name='thirdGuPolicyItemKindDto' property='kindCode'/>" value="<bean:write name='guThirdItemKindDto' property='kindCode'/>"> <input name="ThirdGuItemKindKindName" class="readonly" type="text" style="width: 65%" readonly title="<bean:write name='thirdGuPolicyItemKindDto' property='kindName'/>" value="<bean:write name='guThirdItemKindDto' property='kindName'/>"> <logic:present name="guThirdItemKindDto" property="subProposalNo"> <input name="ThirdGuItemKindSubProposalNo" type="hidden" value="<bean:write name='guThirdItemKindDto' property='subProposalNo'/>"> </logic:present> <logic:present name="guThirdItemKindDto" property="countFlag"> <logic:notEqual name="guThirdItemKindDto" property="countFlag" value="0"> <input name="ThirdGuItemKindCountFlag" type="hidden" value="<bean:write name='guThirdItemKindDto' property='countFlag'/>"> </logic:notEqual> </logic:present> <input name="ThirdGuItemKindSurrenderInd" type="hidden" value="0"> <input name="ThirdGuItemKindItemNo" type="hidden" value="<%=request.getAttribute("itemNo")%>"> <input name="ThirdGuItemKindItemDetailNo" type="hidden" value="0"> <input name="ThirdGuItemKindPlanCode" type="hidden" value="<bean:write name='guThirdItemKindDto' property='planCode'/>"> <input name="ThirdGuItemKindRiskCode" type="hidden" value="<bean:write name='guThirdItemKindDto' property='riskCode'/>"> <input name="ThirdGuItemKindCompanyCode" type="hidden" value="<%=request.getAttribute("companyCode")%>"> <input name="ThirdGuItemKindItemCode" type="hidden" value="<bean:write name='guThirdItemKindDto' property='itemCode'/>"> <input name="ThirdGuItemKindReSpecialInd" type="hidden" value="<bean:write name='guThirdItemKindDto' property='reSpecialInd'/>"> <input name="ThirdGuItemKindStartDate" type="hidden" value="<bean:write name='guThirdItemKindDto' property='startDate'/>" title="<bean:write name='thirdGuPolicyItemKindDto' property='startDate'/>"> <input name="ThirdGuItemKindEndDate" type="hidden" value="<bean:write name='guThirdItemKindDto' property='endDate'/>" title="<bean:write name='thirdGuPolicyItemKindDto' property='endDate'/>"> <input name="ThirdGuItemKindCurrency" type="hidden" onchange=" " value="<bean:write name='guThirdItemKindDto' property='currency'/>" title="<bean:write name='thirdGuPolicyItemKindDto' property='currency'/>" > <input name="ThirdGuItemKindItemKindNo" type="hidden" title="<bean:write name='thirdGuPolicyItemKindDto' property='itemKindNo'/>" value="<bean:write name='guThirdItemKindDto' property='itemKindNo'/>"> <input name="ThirdGuItemKindItemDetailCode" class="codecode" type="text" style="display:none;width: 30%" title="<bean:write name='thirdGuPolicyItemKindDto' property='itemDetailCode'/>" value="<bean:write name='guThirdItemKindDto' property='itemDetailCode'/>" ondblclick="getField(this, 'ItemKindThird', '<bean:message key='alert.message.sameItemDetailCode' />');code_CodeSelect(this,'itemDetailCodeByRiskCode','0,1','Y','riskCode=<%=request.getAttribute("riskCode")%>','');" onkeyup="getField(this, 'ItemKindThird', '<bean:message key='alert.message.sameItemDetailCode' />');code_CodeSelect(this,'itemDetailCodeByRiskCode','0,1','Y','riskCode=<%=request.getAttribute("riskCode")%>','');" onchange="getField(this, 'ItemKindThird', '<bean:message key='alert.message.sameItemDetailCode' />');code_CodeChange(this,'itemDetailCodeByRiskCode','0,1','Y','riskCode=<%=request.getAttribute("riskCode")%>','');"> <input name="ThirdGuItemKindItemDetailList" class="readonly" type="text" style="display:none;width: 65%" readonly title="<bean:write name='thirdGuPolicyItemKindDto' property='itemDetailList'/>" value="<bean:write name='guThirdItemKindDto' property='itemDetailList'/>"> <input name="ThirdGuItemKindKindInd" type="hidden" value="<bean:write name='guThirdItemKindDto' property='kindInd'/>"> </td> <td class="white"> <input name="ThirdGuItemKindCalculateInd" class="codecode" type="text" style="width:30%" title="<bean:write name='thirdGuPolicyItemKindDto' property='calculateInd'/>" value="<bean:write name='guThirdItemKindDto' property='calculateInd'/>" ondblclick="getField(this,'ItemKindThird');code_CodeSelect(this,'calculateInd','0,1','Y','02,CalculateInd','setGuItemKindCalculateIndOnchange();');" onkeyup="getField(this,'ItemKindThird');code_CodeSelect(this,'calculateInd','0,1','Y','02,CalculateInd','setGuItemKindCalculateIndOnchange();');" onchange="getField(this,'ItemKindThird');code_CodeChange(this,'calculateInd','0,1','Y','02,CalculateInd','setGuItemKindCalculateIndOnchange();');"> <input name="ThirdGuItemKindCalculateIndName" class="readonly" type="text" style="width:65%" readonly title="<app:localeName name="thirdGuPolicyItemKindDto" property="calculateInd,CalculateInd" codeType="ggCodeCodeName" filter="true" />" value="<app:localeName name="guThirdItemKindDto" property="calculateInd,CalculateInd" codeType="ggCodeCodeName" filter="true" />"> </td> <td class="white"> <input name="ThirdGuItemKindSumInsured" class="common01" type="text" style="width: 100%" title="<bean:write name='thirdGuPolicyItemKindDto' property='sumInsured'/>" value="<bean:write name='guThirdItemKindDto' property='sumInsured'/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','Third');"> </td> <td class="white"> <input name="ThirdGuItemKindRate" class="common01" type="text" style="width: 100%" title="<bean:write name='thirdGuPolicyItemKindDto' property='rate' format="#,##0.000000"/>" value="<bean:write name='guThirdItemKindDto' property='rate' format="#,##0.000000"/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','Third');"> <input name="GuCalculator" type="hidden" value="100"> </td> <td class="white"> <input name="ThirdGuItemKindShortRateFlag" class="codecode" type="text" style="width: 30%" title="<bean:write name='thirdGuPolicyItemKindDto' property='shortRateFlag'/>" value="<bean:write name='guThirdItemKindDto' property='shortRateFlag'/>" ondblclick="getField(this, 'ItemKindThird', '<bean:message key="alert.message.kindcodeMustInput"/>', '<bean:message key="alert.message.zeroError"/>');code_CodeSelect(this,'shortRateFlag','0,1','Y','02,ShortRateFlag','changeGuItemKindShortRateFlag();');" onkeyup="getField(this, 'ItemKindThird', '<bean:message key="alert.message.kindcodeMustInput"/>', '<bean:message key="alert.message.zeroError"/>');code_CodeSelect(this,'shortRateFlag','0,1','Y','02,ShortRateFlag','changeGuItemKindShortRateFlag();');" onchange="getField(this, 'ItemKindThird', '<bean:message key="alert.message.kindcodeMustInput"/>', '<bean:message key="alert.message.zeroError"/>');code_CodeChange(this,'shortRateFlag','0,1','Y','02,ShortRateFlag','changeGuItemKindShortRateFlag();');"> <input name="ThirdGuItemKindShortRateFlagName" class="common01" type="text" style="width: 65%" readonly title="<app:localeName name="thirdGuPolicyItemKindDto" property="shortRateFlag,ShortRateFlag" codeType="ggCodeCodeName" filter="true" />" value="<app:localeName name="guThirdItemKindDto" property="shortRateFlag,ShortRateFlag" codeType="ggCodeCodeName" filter="true" />"> </td> <td class="white"> <input name="ThirdGuItemKindShortRate" type="hidden" value="<bean:write name='guThirdItemKindDto' property='shortRate' format="0.00"/>" title="<bean:write name='thirdGuPolicyItemKindDto' property='shortRate' format="0.00"/>"> <input name="ThirdGuItemKindShortRateNumerator" class="common01" readonly="readonly" type="text" style="width: 42%" value="<bean:write name='guThirdItemKindDto' property='shortRateNumerator' format="#"/>" title="<bean:write name='thirdGuPolicyItemKindDto' property='shortRateNumerator' format="#"/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','Third');">/ <input name="ThirdGuItemKindShortRateDenominator" class="common01" readonly="readonly" type="text" style="width: 42%" value="<bean:write name='guThirdItemKindDto' property='shortRateDenominator' format="#"/>" title="<bean:write name='thirdGuPolicyItemKindDto' property='shortRateDenominator' format="#"/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','Third');"> </td> <td class="white"> <input name="ThirdGuItemKindUwPremium" class="readonly" type="text" style="width: 100%" readonly title="<bean:write name='thirdGuPolicyItemKindDto' property='uwPremium'/>" value="<bean:write name='guThirdItemKindDto' property='uwPremium'/>" onchange=" "> <input name="ThirdGuItemKindOriginUWPremium" class="common01" type="hidden" style="width: 100%" value="<bean:write name='guThirdItemKindDto' property='originUWPremium'/>"> </td> <td class="white"> <input name="ThirdGuItemKindGrossPremium" class="common01" type="text" style="width: 100%" title="<bean:write name='thirdGuPolicyItemKindDto' property='grossPremium'/>" value="<bean:write name='guThirdItemKindDto' property='grossPremium'/>" onchange=""> <input name="ThirdGuItemKindOriginGrossPremium" class="common01" type="hidden" value="<bean:write name='guThirdItemKindDto' property='originGrossPremium'/>"> </td> <td class="white" align="center"> <input name="button_ThirdKindLimitKind_Edit" class="smallbutton" type="button" style="cursor: hand" value="<bean:message key="button.limit"/>" onclick="showSubPageForPrpall(this,'span_ThirdKindLimitKind_SubPage');"> <SPAN id="span_ThirdKindLimitKind_SubPage" name="span_ThirdKindLimitKind_SubPage" style="display: none; position: absolute; width: 790; background-color: FFFFFF;"> <jsp:include page="/prpall/plugin/common/riskclass/07/itemengineering/ThirdKindLimitKind.jsp" /> </SPAN> <INPUT name="button_ItemKindThird_Delete" class="smallbutton" type="button" value="<bean:message key="button.delete"/>" ind="ind" onclick="deleteRowInTable(this,'ItemKindThird',1,1);afterEndorDeleteItemKind(this, 'Third', '')"> </td> </tr> </logic:notEmpty> <% } } %> </tbody> <tfoot> <TR> <TD class="title02" colspan="9"> <P align="left"> <!-- 判断业务类型为 Endor 时显示按钮 --> <logic:equal parameter="riskCode" value="9929"> <input name="button_ItemKindThird_Insert" class="button" type="button" style="cursor:hand" ind="ind" value="<bean:message key='button.add'/>" onclick="insertEngineeringThridItemKind(this, 'ItemKindThird', 1, '<bean:message key='alert.message.aThirdKindOfAItem' />')"> </logic:equal> <%--<!-- 若投保时已显示,可添加非 Endor 时的渲染逻辑 -->--%> <%--<logic:notEqual parameter="businessType" value="Endor">--%> <%--<input name="button_ItemKindThird_Insert" class="button" type="button" style="cursor:hand" ind="ind"--%> <%--value="<bean:message key='button.add'/>"--%> <%--onclick="insertEngineeringThridItemKind(this, 'ItemKindThird', 1, '<bean:message key='alert.message.aThirdKindOfAItem' />')">--%> <%--</logic:notEqual>--%> </P> </TD> </TR> </tfoot> </table> <!--附加险 --> <table id="ItemKindSub" name="ItemKindSub" class="common" cellpadding="1" cellspacing="1"> <thead> <tr style="display: none"> <td width="18%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="9%" align="center"> </td> <td width="12%" align="center"> </td> <td width="12%" align="center"> </td> <td width="13%" align="center"> </td> </tr> <tr> <td class="left" colspan="9"><strong><bean:message key="GuItemKindDto.subKind"/></strong></td> </tr> <tr> <td width="18%" class="white" align="center"><bean:message key="GuItemKindDto.kindCode" /> <font color="red">*</font></td> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.numberSumInsured"/> <font color="red">*</font></td> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.thirdSumInsured" /> <font color="red">*</font></td> <logic:equal name='ggRiskDto' property='calculator' value='100'> <TD class="white" align="center" width="9%"><bean:message key="GuItemKindDto.rate"/>(%) <font color="red">*</font></TD> </logic:equal> <logic:notEqual name='ggRiskDto' property='calculator' value='100'> <TD class="white" align="center" width="9%"><bean:message key="GuItemKindDto.rate"/>(‰) <font color="red">*</font></TD> </logic:notEqual> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.shortRateFlag" /> <font color="red">*</font></td> <td width="9%" class="white" align="center"><bean:message key="GuItemKindDto.shortRate" /></td> <td width="12%" class="white" align="center"><bean:message key="GuItemKindDto.uwPremium" /></td> <td width="12%" class="white" align="center"><bean:message key="GuItemKindDto.grossPremium" /> <font color="red">*</font></td> <td width="13%" class="white" align="center"></td> </tr> </thead> <tbody> <% List guSubItemKindDtoList = (List) request.getAttribute("guItemKindSubList"); if (guSubItemKindDtoList != null) { int lengthSubList = guSubItemKindDtoList.size(); for (int index = 0; index < lengthSubList; index++) { request.setAttribute("subGuItemKindDto", guSubItemKindDtoList.get(index)); %> <logic:notEmpty name="subGuItemKindDto" property="sumInsured"> <logic:equal parameter="businessType" value="Endor"> <bean:define name="subGuItemKindDto" property="guPolicyItemKindDto" id="subGuPolicyItemKindDto" /> </logic:equal> <tr> <td class="white"> <input name="SubGuItemKindFlag" type="hidden" endorFlag="B" value="<bean:write name='subGuItemKindDto' property='flag'/>" title="<bean:write name='subGuPolicyItemKindDto' property='flag' filter='true'/>"> <input name="SubGuItemKindProjectCode" type="hidden" value="<bean:write name='subGuItemKindDto' property='projectCode'/>"> <logic:present name="subGuItemKindDto" property="subProposalNo"> <input name="SubGuItemKindSubProposalNo" type="hidden" value="<bean:write name='subGuItemKindDto' property='subProposalNo'/>"> </logic:present> <logic:present name="subGuItemKindDto" property="countFlag"> <logic:notEqual name="subGuItemKindDto" property="countFlag" value="0"> <input name="SubGuItemKindCountFlag" type="hidden" value="<bean:write name='subGuItemKindDto' property='countFlag'/>"> </logic:notEqual> </logic:present> <input name="SubGuItemKindSurrenderInd" type="hidden" value="0"> <input name="SubGuItemKindItemNo" type="hidden" value="<%=request.getAttribute("itemNo")%>"> <input name="SubGuItemKindItemDetailNo" type="hidden" value="0"> <input name="SubGuItemKindPlanCode" type="hidden" value="<bean:write name='subGuItemKindDto' property='planCode'/>"> <input name="SubGuItemKindRiskCode" type="hidden" value="<bean:write name='subGuItemKindDto' property='riskCode'/>"> <input name="SubGuItemKindCompanyCode" type="hidden" value="<%=request.getAttribute("companyCode")%>"> <input name="SubGuItemKindItemCode" type="hidden" value="<bean:write name='subGuItemKindDto' property='itemCode'/>"> <input name="SubGuItemKindReSpecialInd" type="hidden" value="<bean:write name='subGuItemKindDto' property='reSpecialInd'/>"> <input name="SubGuItemKindStartDate" type="hidden" value="<bean:write name='subGuItemKindDto' property='startDate'/>" title="<bean:write name='subGuPolicyItemKindDto' property='startDate'/>"> <input name="SubGuItemKindEndDate" type="hidden" value="<bean:write name='subGuItemKindDto' property='endDate'/>" title="<bean:write name='subGuPolicyItemKindDto' property='endDate'/>"> <input name="SubGuItemKindDiscount" type="hidden" value="<bean:write name='subGuItemKindDto' property='discount'/>"> <input name="SubGuItemKindCurrency" type="hidden" onchange=" " value="<bean:write name='subGuItemKindDto' property='currency'/>" title="<bean:write name='subGuPolicyItemKindDto' property='currency'/>" > <input name="SubGuItemKindItemKindNo" type="hidden" title="<bean:write name='subGuPolicyItemKindDto' property='itemKindNo'/>" value="<bean:write name='subGuItemKindDto' property='itemKindNo'/>"> <input name="SubGuItemKindItemDetailCode" class="codecode" type="text" style="display:none;width: 30%" title="<bean:write name='subGuPolicyItemKindDto' property='itemDetailCode'/>" value="<bean:write name='subGuItemKindDto' property='itemDetailCode'/>" ondblclick="getField(this, 'ItemKindSub', '<bean:message key='alert.message.sameItemDetailCode' />');code_CodeSelect(this,'itemDetailCodeByRiskCode','0,1','Y','riskCode=<%=request.getAttribute("riskCode")%>','');" onkeyup="getField(this, 'ItemKindSub', '<bean:message key='alert.message.sameItemDetailCode' />');code_CodeSelect(this,'itemDetailCodeByRiskCode','0,1','Y','riskCode=<%=request.getAttribute("riskCode")%>','');" onchange="getField(this, 'ItemKindSub', '<bean:message key='alert.message.sameItemDetailCode' />');code_CodeChange(this,'itemDetailCodeByRiskCode','0,1','Y','riskCode=<%=request.getAttribute("riskCode")%>','');"> <input name="SubGuItemKindItemDetailList" class="readonly" type="text" style="display:none;width: 65%" readonly title="<bean:write name='subGuPolicyItemKindDto' property='itemDetailList'/>" value="<bean:write name='subGuItemKindDto' property='itemDetailList'/>"> <input name="SubGuItemKindKindCode" class="codecode" type="text" style="width:30%" title="<bean:write name='subGuPolicyItemKindDto' property='kindCode'/>" value="<bean:write name='subGuItemKindDto' property='kindCode'/>" ondblclick="getField(this, 'ItemKindSub', '<bean:message key='alert.message.itemkind' />');code_CodeSelect(this,'getKindCodeWithIndNew','0,1,2,3,4,8,9,','Y','riskCode='+fm.SubGuItemKindRiskCode[1].value+',kindInd=2,productEdition=fm.productEdition.value','');changeSubKindCodeCallBack(this);" onkeyup="getField(this, 'ItemKindSub', '<bean:message key='alert.message.itemkind' />');code_CodeSelect(this,'getKindCodeWithIndNew','0,1,2,3,4,8,9','Y','riskCode='+fm.SubGuItemKindRiskCode[1].value+',kindInd=2,productEdition=fm.productEdition.value','');changeSubKindCodeCallBack(this);" onchange="getField(this, 'ItemKindSub', '<bean:message key='alert.message.itemkind' />');code_CodeChange(this,'getKindCodeWithIndNew','0,1,2,3,4,8,9','Y','riskCode='+fm.SubGuItemKindRiskCode[1].value+',kindInd=2,productEdition=fm.productEdition.value','');changeSubKindCodeCallBack(this);"> <INPUT name="SubGuItemKindKindName" class="readonly" readonly type="text" style="width:60%" readonly title="<bean:write name='subGuPolicyItemKindDto' property='kindName'/>" value="<bean:write name='subGuItemKindDto' property='kindName'/>"> <input name="SubGuItemKindKindInd" type="hidden" value="<bean:write name='subGuItemKindDto' property='kindInd'/>"> </td> <td class="white"> <input name="SubGuItemKindCalculateInd" class="codecode" type="text" style="width:30%" title="<bean:write name='subGuPolicyItemKindDto' property='calculateInd'/>" value="<bean:write name='subGuItemKindDto' property='calculateInd'/>" ondblclick="getField(this,'ItemKindSub');code_CodeSelect(this,'calculateInd','0,1','Y','02,CalculateInd','setGuItemKindCalculateIndOnchange();');" onkeyup="getField(this,'ItemKindSub');code_CodeSelect(this,'calculateInd','0,1','Y','02,CalculateInd','setGuItemKindCalculateIndOnchange();');" onchange="getField(this,'ItemKindSub');code_CodeChange(this,'calculateInd','0,1','Y','02,CalculateInd','setGuItemKindCalculateIndOnchange();');"> <input name="SubGuItemKindCalculateIndName" class="readonly" type="text" style="width:65%" readonly title="<app:localeName name="subGuPolicyItemKindDto" property="calculateInd,CalculateInd" codeType="ggCodeCodeName" filter="true" />" value="<app:localeName name="subGuItemKindDto" property="calculateInd,CalculateInd" codeType="ggCodeCodeName" filter="true" />"> </td> <td class="white"> <input name="SubGuItemKindSumInsured" class="common01" type="text" style="width: 100%" title="<bean:write name='subGuPolicyItemKindDto' property='sumInsured'/>" value="<bean:write name='subGuItemKindDto' property='sumInsured'/>" onchange="checkSubKindInsured(this);calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','Sub')"> </td> <td class="white"> <input name="SubGuItemKindRate" class="common01" type="text" style="width: 100%" title="<bean:write name='subGuPolicyItemKindDto' property='rate' format="#,##0.000000"/>" value="<bean:write name='subGuItemKindDto' property='rate' format="#,##0.000000"/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','Sub')"> <input name="GuCalculator" type="hidden" value="100"> </td> <td class="white"> <input name="SubGuItemKindShortRateFlag" class="codecode" type="text" style="width: 30%" title="<bean:write name='subGuPolicyItemKindDto' property='shortRateFlag'/>" value="<bean:write name='subGuItemKindDto' property='shortRateFlag'/>" ondblclick="getField(this, 'ItemKindSub', '<bean:message key="alert.message.kindcodeMustInput"/>', '<bean:message key="alert.message.zeroError"/>');code_CodeSelect(this,'shortRateFlag','0,1','Y','02,ShortRateFlag','changeGuItemKindShortRateFlag();');" onkeyup="getField(this, 'ItemKindSub', '<bean:message key="alert.message.kindcodeMustInput"/>', '<bean:message key="alert.message.zeroError"/>');code_CodeSelect(this,'shortRateFlag','0,1','Y','02,ShortRateFlag','changeGuItemKindShortRateFlag();');" onchange="getField(this, 'ItemKindSub', '<bean:message key="alert.message.kindcodeMustInput"/>', '<bean:message key="alert.message.zeroError"/>');code_CodeChange(this,'shortRateFlag','0,1','Y','02,ShortRateFlag','changeGuItemKindShortRateFlag();');"> <input name="SubGuItemKindShortRateFlagName" class="common01" type="text" style="width: 65%" readonly title="<app:localeName name="subGuPolicyItemKindDto" property="shortRateFlag,ShortRateFlag" codeType="ggCodeCodeName" filter="true" />" value="<app:localeName name="subGuItemKindDto" property="shortRateFlag,ShortRateFlag" codeType="ggCodeCodeName" filter="true" />"> </td> <td class="white"> <input name="SubGuItemKindShortRate" type="hidden" value="<bean:write name='subGuItemKindDto' property='shortRate' format="0.00"/>" title="<bean:write name='subGuPolicyItemKindDto' property='shortRate' format="0.00"/>"> <input name="SubGuItemKindShortRateNumerator" class="common01" readonly="readonly" type="text" style="width: 42%" value="<bean:write name='subGuItemKindDto' property='shortRateNumerator' format="#"/>" title="<bean:write name='subGuPolicyItemKindDto' property='shortRateNumerator' format="#"/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','Sub')">/ <input name="SubGuItemKindShortRateDenominator" class="common01" readonly="readonly" type="text" style="width: 42%" value="<bean:write name='subGuItemKindDto' property='shortRateDenominator' format="#"/>" title="<bean:write name='subGuPolicyItemKindDto' property='shortRateDenominator' format="#"/>" onchange="calculatorPremium(this,'<bean:message key="alert.message.kindcodeMustInput"/>','<bean:message key="alert.message.zeroError"/>','Sub')"> </td> <td class="white"> <input name="SubGuItemKindUwPremium" class="readonly" type="text" style="width: 100%" readonly title="<bean:write name='subGuPolicyItemKindDto' property='uwPremium'/>" value="<bean:write name='subGuItemKindDto' property='uwPremium'/>" onchange=" "> <input name="SubGuItemKindOriginUWPremium" class="common01" type="hidden" style="width: 100%" value="<bean:write name='subGuItemKindDto' property='originUWPremium'/>"> </td> <td class="white"> <input name="SubGuItemKindGrossPremium" class="common01" type="text" style="width: 100%" title="<bean:write name='subGuPolicyItemKindDto' property='grossPremium'/>" value="<bean:write name='subGuItemKindDto' property='grossPremium'/>" onchange=""> <input name="SubGuItemKindOriginGrossPremium" class="common01" type="hidden" value="<bean:write name='subGuItemKindDto' property='originGrossPremium'/>"> </td> <td class="white" align="center"> <input name="button_SubKindLimitKind_Edit" class="smallbutton" type="button" style="cursor: hand" value="<bean:message key="button.limit"/>" onclick="showSubPageForPrpall(this,'span_SubKindLimitKind_SubPage');"> <SPAN id="span_SubKindLimitKind_SubPage" name="span_SubKindLimitKind_SubPage" style="display: none; position: absolute; width: 790; background-color: FFFFFF;"> <jsp:include page="/prpall/plugin/common/riskclass/07/itemengineering/SubKindLimitKind.jsp" /> </SPAN> <INPUT name="button_ItemKindSub_Delete" class="smallbutton" type="button" value="<bean:message key="button.delete"/>" ind="ind" onclick="deleteRowInTable(this,'ItemKindSub',1,1);afterEndorDeleteItemKind(this, 'Sub')"> </td> </tr> </logic:notEmpty> <% } } %> </tbody> <tfoot> <TR> <TD class="title02" colspan="9"> <P align="left"><input name="button_ItemKindSub_Insert" class="button" type="button" style="cursor:hand" ind="ind" value="<bean:message key='button.add'/>" onclick="insertRowInTable(this, 'ItemKindSub', 1);"> </P> </TD> </TR> </tfoot> </table> <app:validate formName="ItemEngineeringKindBlockForm" jsFormName="ItemEngineeringKindBlockForm" /> button_ItemKindThird_Insert 这个按钮没有显示出来,请分析解决
07-23
资源下载链接为: https://pan.quark.cn/s/d9ef5828b597 在本文中,我们将探讨如何通过 Vue.js 实现一个带有动画效果的“回到顶部”功能。Vue.js 是一款用于构建用户界面的流行 JavaScript 框架,其组件化和响应式设计让实现这种交互功能变得十分便捷。 首先,我们来分析 HTML 代码。在这个示例中,存在一个 ID 为 back-to-top 的 div 元素,其中包含两个 span 标签,分别显示“回到”和“顶部”文字。该 div 元素绑定了 Vue.js 的 @click 事件处理器 backToTop,用于处理点击事件,同时还绑定了 v-show 指令来控制按钮的显示与隐藏。v-cloak 指令的作用是在 Vue 实例渲染完成之前隐藏该元素,避免出现闪烁现象。 CSS 部分(backTop.css)主要负责样式设计。它首先清除了一些默认的边距和填充,对 html 和 body 进行了全屏布局,并设置了相对定位。.back-to-top 类则定义了“回到顶部”按钮的样式,包括其位置、圆角、阴影、填充以及悬停时背景颜色的变化。此外,与 v-cloak 相关的 CSS 确保在 Vue 实例加载过程中隐藏该元素。每个 .page 类代表一个页面,每个页面的高度设置为 400px,用于模拟多页面的滚动效果。 接下来是 JavaScript 部分(backTop.js)。在这里,我们创建了一个 Vue 实例。实例的 el 属性指定 Vue 将挂载到的 DOM 元素(#back-to-top)。data 对象中包含三个属性:backTopShow 用于控制按钮的显示状态;backTopAllow 用于防止用户快速连续点击;backSeconds 定义了回到顶部所需的时间;showPx 则规定了滚动多少像素后显示“回到顶部”按钮。 在 V
资源下载链接为: https://pan.quark.cn/s/9e7ef05254f8 以下是简化后的内容: 程序集变量 计数器:整数型 文本发送计次:整数型 子程序 __启动窗口_创建完毕 _手动发送数据_被单击 停止发送 发送预处理 判断端口是否启动成功,失败则提示并返回 根据组合框选择的进制类型,将编辑框内容转换后发送 发送失败则提示并返回 进制转换(被转换文本,被转换进制,转换的进制) 检查进制范围,错误则返回提示 规范参数,逐字符检查是否符合进制要求,不符合则返回错误提示 若进制相同直接返回原文本 否则进行进制转换并返回结果 _退出_被单击销毁 _组合框_端口号_列表项被选择 停止发送 设置端口号 _组合框_波特率_列表项被选择 停止发送 设置波特率 _组合框_数据位_列表项被选择 停止发送 设置数据位数 _组合框_校验_列表项被选择 停止发送 设置奇偶校验方案 _组合框_停止位_列表项被选择 停止发送 设置停止位数 发送预处理 停止发送 设置波特率、端口号、数据位数、奇偶校验方案、停止位数 根据奇偶校验方案设置校验标志 _选择框_DTR_被单击 根据选中状态设置信号操作 _选择框_RTS_被单击 根据选中状态设置信号操作 _选择框_Break_被单击 根据选中状态设置信号操作 _编辑框_发送周期_内容被改变 若时钟标志选中,设置时钟周期 _选择框_时钟标志_被单击 若选中,设置发送方式为时钟模式,启动发送并设置时钟周期 否则,停止发送,设置时钟周期为0 _组合框_发送方式_列表项被选择 根据选择设置时钟标志和时钟周期 _端口_发送数据_收到信号 _端口_接收数据_收到信号 _端口_接收数据_数据到达 根据接收数据的进制选择,将数据转换后显示在编辑框中 _时钟1_周期事件 根据发送方式和进制选择,周期性发送数据 打开并读入文件 打开文件,读取内容到编辑框 _打开
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值