Home > Net >  Unable to get undefined or null reference the properties of the "elements"
Unable to get undefined or null reference the properties of the "elements"

Time:09-26

HTML code is as follows
 
<% @ Page Language="c #" AutoEventWireup="true" CodeFile="ConfigInfo. Aspx. Cs" Inherits="MbClient_ConfigInfo % & gt;"
<% @ Register Src="https://bbs.csdn.net/topics/CtrlMap.ascx" TagName="CtrlMap TagPrefix"="ucs 1" % & gt;


<% %=Constant. The SYSTEM_NAME & gt; - policy details & lt;/title> <br/><The link href="https://bbs.csdn.net/css/css.css" rel="stylesheet" type="text/CSS"/& gt; <br/></head> <br/><body> <br/><The form id="form1" runat="server" & gt; <br/><div> <br/><! - # include file="inc/head. The HTML" - & gt; <br/><The table border="0" width="100%" cellspacing="0 cellpadding=" 0 "" & gt; <br/>& lt; tr> <Td style="width: 180 px" valign="top" & gt; <br/><Ucs 1: CtrlMap ID="CtrlMap1" runat="server"/& gt; <br/></td> <br/><Td valign="top" align="left" & gt; <br/><div> <br/><div> Current location: & lt; % %=Constant. The SYSTEM_NAME & gt;> Site management & gt; Modify the information & lt;/div> <br/><div> <br/><% - the Begin content - % & gt; <br/><The form name="regform" method="post" action="ConfigInfo. Aspx" style="margin: 0 px; "& gt; <br/><Input type="hidden" name="id" value="https://bbs.csdn.net/topics/"/& gt; <br/><Input type="hidden" name="action" value="https://bbs.csdn.net/topics/save"/& gt; <br/><Fieldset & gt; <br/>XXXX... <br/></fieldset> <br/><br/> <br/><Input type="submit" name="submit" value="https://bbs.csdn.net/topics/to modify"/& gt; <Input type="reset" name="Submit2" value="https://bbs.csdn.net/topics/heavy fill in"/& gt; <br/><br/></form> <br/><% % - End content - End & gt; <br/><br/></div> <br/></div> <br/></td> </tr> </table> <br/><! - # include file="inc/foot. HTML" - & gt; <br/></div> <br/></form> <br/></body> <br/><The script type="text/javascript" & gt; <br/>The function CheckBoxSelect (select, val) {<br/><br/>Var obj=document. GetElementById (" f_cf "); <br/>If (select. Checked) {<br/>Obj. Value +=", "+ val. <br/>} else {<br/>Obj. Value=https://bbs.csdn.net/topics/obj.value.replace (", "+ val,"); <br/>Obj. Value=https://bbs.csdn.net/topics/obj.value.replace (val + ", ", "); <br/>Obj. Value=https://bbs.csdn.net/topics/obj.value.replace (val, "); <br/>} <br/><br/><br/><br/><br/>If (obj. Value. The substring (0, 1)==', ') obj.value=https://bbs.csdn.net/topics/obj.value.substring (1); <br/>} <br/><br/><br/><br/>The function SetCheckBox (STR) {<br/>If (STR==' ') return; <br/>Var STRS=new Array ();//define a array <br/>STRS=STR. The split (", ");//character segmentation <br/>For (var j=0; j<STRS. Length; J++) {<br/>//alert (document. Myfrm); <br/><br/><span style="color: # FF0000;"> for (var I=0; i<Document. Form1. Elements. Length; I++) {<br/></span> var e=document. Form1. Elements [I]; <br/>If (e.v alue=https://bbs.csdn.net/topics/=STRS [j]) {<br/>Hecked of e.c. with our fabrication:=true; <br/>break; <br/>} <br/>} <br/>} <br/>} <br/><br/>SetCheckBox (' & lt; % %=feeConfig. F_cf & gt; '); <br/>The function CheckAll () {<br/>If (document. All. Check_all. Checked) {<br/>SelectAll (true); <br/>Document. The getElementById (" f_cf "). The value="https://bbs.csdn.net/topics/in Beijing, tianjin, Shanghai, chongqing, hebei, henan, yunnan, liaoning, heilongjiang, hunan, anhui, shandong, xinjiang, jiangsu, zhejiang, jiangxi, hubei, guangxi, gansu, shanxi, Inner Mongolia, shanxi, jilin, fujian, guizhou, qinghai, Tibet, sichuan, ningxia and hainan, guangdong"; <br/><br/>} else {<br/>SelectAll (false); <br/>Document. The getElementById (" f_cf "). The value=""; <br/>} <br/>} <br/>The function SelectAll (checked) {<br/>for (var i=0; i<Document. Form1. Elements. Length; I++) {<br/>Var e=document. Form1. Elements [I]; <br/><br/>If (e.n ame!="allbox" & amp; & E.n ame! Hecked of e.c. with our fabrication:=="tagcontent") checked; <br/>} <br/>} <br/><br/>The function showConfig (val) {<br/><br/>Form1. F_server. Value=https://bbs.csdn.net/topics/val; <br/>Var TXT=""; <br/><br/>If (" Call_MM_URL_SendSMS=="val) {<br/>TXT="(url) to modify the url (/url) port parameters (data), content parameters (/data) (type) json (/type)". <br/>Form1. F_ctrl. Value=https://bbs.csdn.net/topics/txt; <br/>Form1. F_ctrl. The innerText=TXT <br/>} <br/>Else if (=="Call_WPCP_URL_SendSMS" val) {<br/>TXT="(regurl) changes the url (/regurl) (feeurl) changes the url (/feeurl) (success) successful keyword (/success) (type) json (/type)". <br/>Form1. F_ctrl. Value=https://bbs.csdn.net/topics/txt; <br/>Form1. F_ctrl. The innerText=TXT <br/>} <br/>Else if (=="SendSMS" val) {<br/>TXT="SendSMS (SMS) instruction (/SMS) (sport) 106 XXXXX (/sport) (sendcontext) the content of the instruction to reply (/sendcontext)"; <br/>Form1. F_ctrl. Value=https://bbs.csdn.net/topics/txt; <br/>Form1. F_ctrl. The innerText=TXT <br/>} <br/><br/>} <br/><br/>The function buildTag (select, val, defaultval) {<br/><br/>Var. TXT=form1 f_ctrl. The innerText; <br/><br/>If (TXT==""). TXT=form1 f_ctrl. Value; <br/><br/><br/><br/>Var tag="(" + val +") "+ defaultval +" (/val "+ +") "; <br/><br/>TXT=TXT. Replace (tag, ""); <br/>If (select. Checked) {<br/>TXT=TXT + tag; <br/>} else {<br/><br/>} <br/>Form1. F_ctrl. Value=https://bbs.csdn.net/topics/txt; <br/>Form1. F_ctrl. The innerText=TXT; <br/>} <br/><br/>The function respType (ctype) {<br/>Var. TXT=form1 f_ctrl. The innerText; nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/net/33086.html" target="_blank" style="color:#999">https//www.codepudding.com/net/33086.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/net/33085.html'>WPF opened the new interface on the basis of the original interface open? As shown in figure</a></div> <div class="detail-arr-right">Next:<a href='/net/33087.html'>NPOI workbook. Write error can't find method: "Void ICSharpCode</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=C%23' target='_blank'>C#</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>