04 RadioGroup

本文介绍了Android中RadioGroup和RadioButton的基本概念与使用方法。RadioGroup作为容器组件,用于容纳多个RadioButton实现单选功能,通过LinearLayout进行布局管理。文章详细阐述了如何在XML中定义这些组件,并展示了具体的代码示例。

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

 1. RadioGroup和RadioButton:

   在HTML中,<input type="radio">


java.lang.Object
    |-android.view.View
 	   |-android.view.ViewGroup
 	 	   |-android.widget.LinearLayout
 	 	 	   |-android.widget.RadioGroup

2. RadioGroup 单选钮在开发中提供了 一种多选一的操作模式。

  LinearLayout属于布局管理器,所以对于单选按钮而言肯定也要采用一定的布局管理。

3. 对于很多语言的单选钮直接定义即可,但是在android中,RadioGroup定义的只是一个
单选钮的容器,在这个容器中以后要加入多个单选项,而这个单选项就是RadioButton。


4. RadioButton:

java.lang.Object
   |-android.view.View
 	   |-android.widget.TextView
 	 	   |-android.widget.Button
 	 	 	   |-android.widget.CompoundButton
 	 	 	 	   |-android.widget.RadioButton




  <RadioGroup
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:checkedButton="@+id/male1">
        
        <RadioButton
          android:id="@+id/male1"
          android:text="@string/namemale"/>

      <RadioButton
          android:id="@+id/female1"
          android:text="@string/namefemale"/>
         
       </RadioGroup>

e.target.innerHTML值为<div><div class="ant-spin-nested-loading"><div class="ant-spin-container"><div class="_face_detect_next_"><div class="m-form-control content"><div class="content-video"><div class="ant-row video-wrap-div" style="row-gap: 0px;"><div class="video-wrap"><span><span role="img" class="anticon myicon-videoDefault myicon undefined"><svg viewBox="0 0 80 80" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="" style="width: 80px; height: 80px;"><path fill-rule="evenodd" clip-rule="evenodd" fill="#222" d="M72 40c0 6.627-5.373 12-12 12-6.628 0-12-5.373-12-12s5.372-12 12-12c6.627 0 12 5.373 12 12zm-21.004 0c0 4.973 4.031 9.004 9.004 9.004s9.004-4.031 9.004-9.004-4.031-9.004-9.004-9.004-9.004 4.031-9.004 9.004zM40 8c6.627 0 12 5.373 12 12s-5.373 12-12 12c-6.628 0-12-5.373-12-12S33.372 8 40 8zm0 21.004c4.973 0 9.004-4.031 9.004-9.004S44.973 10.996 40 10.996 30.996 15.027 30.996 20s4.031 9.004 9.004 9.004zM8 40c0-6.627 5.372-12 12-12 6.627 0 12 5.373 12 12s-5.373 12-12 12c-6.628 0-12-5.373-12-12zm21.004 0c0-4.973-4.031-9.004-9.004-9.004S10.996 35.027 10.996 40s4.031 9.004 9.004 9.004 9.004-4.031 9.004-9.004zM37 40a3 3 0 116 0 3 3 0 01-6 0zm15 20c0 6.627-5.373 12-12 12-6.628 0-12-5.373-12-12s5.372-12 12-12c6.627 0 12 5.373 12 12zm-12-9.004c-4.973 0-9.004 4.031-9.004 9.004s4.031 9.004 9.004 9.004 9.004-4.031 9.004-9.004-4.031-9.004-9.004-9.004zm28.284 17.288l-2.828-2.828C71.971 58.941 76 49.941 76 40 76 20.118 59.882 4 40 4 20.117 4 4 20.118 4 40c0 19.883 16.117 36 36 36h36.5c.828 0 1.5.896 1.5 2s-.672 2-1.5 2H40h-.5c-.04 0-.077-.012-.115-.016C17.578 79.654 0 61.885 0 40 0 17.909 17.908 0 40 0c22.091 0 40 17.909 40 40 0 11.046-4.478 21.046-11.716 28.284z"></path></svg></span></span></div></div><div class="video-wrap-left"><div class="ant-row" style="row-gap: 0px;"><div class="ant-col"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container undefined max-width-100 " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 9.28571rem; text-align: left;">Target Filter</div><div class="label-object-padding virtual-line-style css-weight-add ">Target Filter</div><div class="label-normal-wrapper undefined max-width-100 label-custom-wrapper" style="width: 15.7143rem;"><div title="" class="labelText-wrapper labelText undefined" value="" pxunit="14" checkstatus="normal" icon="[object Object]" textalign="left" langlocale="[object Object]"><div><button title="Draw Target" type="button" class="ant-btn" style="margin-right: 20px;"><span><span role="img" class="anticon myicon-drawTarget myicon undefined"><svg viewBox="0 0 20 20" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="" style="width: 20px; height: 20px;"><path fill="none" d="M0 0h20v20H0z"></path><path d="M3 16.5a.5.5 0 00.5.5H6v-1h2.6v-.8a2.308 2.308 0 01.03-.37 2.036 2.036 0 01.11-.35 2.547 2.547 0 01.17-.33.983.983 0 01.12-.15H6V6h8v3.02l.65-.66a3.309 3.309 0 01.3-.25c.11-.06.22-.12.33-.17a2.014 2.014 0 01.35-.1A1.5 1.5 0 0116 7.8V6h1V3.5a.5.5 0 00-.5-.5h-2.51v.99H6V3H3.5a.5.5 0 00-.5.5V6h1v8H3zm7 1v-2.3a.5.5 0 01.14-.35l5.5-5.5a.5.5 0 01.71 0l2.29 2.29a.5.5 0 010 .71l-5.5 5.5a.509.509 0 01-.35.15H10.5a.5.5 0 01-.5-.5zm2-1.5h.17l4-4-.17-.18-4 4zm4.5 1h-.52L17 15.98v.52a.508.508 0 01-.5.5z" fill-rule="evenodd"></path></svg></span></span></button><button title="Clear" type="button" class="ant-btn"><span><span role="img" class="anticon myicon-clear myicon undefined"><svg viewBox="0 0 20 20" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="" style="width: 20px; height: 20px;"><path data-name="37081 1374" fill="none" d="M0 0h20v20H0z"></path><g data-name="590779 946"><path data-name="433189 354" d="M18 5h-4.142a3.981 3.981 0 00-7.716 0H2v2h2v10a1 1 0 001 1h10a1 1 0 001-1V7h2zm-8-1a1.993 1.993 0 011.722 1H8.278A1.993 1.993 0 0110 4zm4 12H6V7h8z"></path><path data-name="37081 1612" d="M11 9h2v5h-2z"></path><path data-name="37081 1613" d="M7 9h2v5H7z"></path></g></svg></span></span></button></div></div><div class="virtual-text-wrapper"><div class="labelText" style="white-space: nowrap; position: absolute; top: 0px; visibility: hidden; z-index: -10000; width: auto;"><div><button title="Draw Target" type="button" class="ant-btn" style="margin-right: 20px;"><span><span role="img" class="anticon myicon-drawTarget myicon undefined"><svg viewBox="0 0 20 20" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="" style="width: 20px; height: 20px;"><path fill="none" d="M0 0h20v20H0z"></path><path d="M3 16.5a.5.5 0 00.5.5H6v-1h2.6v-.8a2.308 2.308 0 01.03-.37 2.036 2.036 0 01.11-.35 2.547 2.547 0 01.17-.33.983.983 0 01.12-.15H6V6h8v3.02l.65-.66a3.309 3.309 0 01.3-.25c.11-.06.22-.12.33-.17a2.014 2.014 0 01.35-.1A1.5 1.5 0 0116 7.8V6h1V3.5a.5.5 0 00-.5-.5h-2.51v.99H6V3H3.5a.5.5 0 00-.5.5V6h1v8H3zm7 1v-2.3a.5.5 0 01.14-.35l5.5-5.5a.5.5 0 01.71 0l2.29 2.29a.5.5 0 010 .71l-5.5 5.5a.509.509 0 01-.35.15H10.5a.5.5 0 01-.5-.5zm2-1.5h.17l4-4-.17-.18-4 4zm4.5 1h-.52L17 15.98v.52a.508.508 0 01-.5.5z" fill-rule="evenodd"></path></svg></span></span></button><button title="Clear" type="button" class="ant-btn"><span><span role="img" class="anticon myicon-clear myicon undefined"><svg viewBox="0 0 20 20" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="" style="width: 20px; height: 20px;"><path data-name="37081 1374" fill="none" d="M0 0h20v20H0z"></path><g data-name="590779 946"><path data-name="433189 354" d="M18 5h-4.142a3.981 3.981 0 00-7.716 0H2v2h2v10a1 1 0 001 1h10a1 1 0 001-1V7h2zm-8-1a1.993 1.993 0 011.722 1H8.278A1.993 1.993 0 0110 4zm4 12H6V7h8z"></path><path data-name="37081 1612" d="M11 9h2v5h-2z"></path><path data-name="37081 1613" d="M7 9h2v5H7z"></path></g></svg></span></span></button></div></div></div></div></div></div></div></div><div class="ant-row faceDetect_notAllowd" style="row-gap: 0px;"><div class="ant-col"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 9.28571rem; text-align: left;">Min Size</div><div class="label-object-padding virtual-line-style css-weight-add ">Min Size</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 7.14286rem;"><div class="ant-input-number labelInput labelInputNumber ant-input-number-disabled"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="true" class="ant-input-number-handler ant-input-number-handler-down ant-input-number-handler-down-disabled"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="256" aria-valuemax="8191" step="1" status="normal" pxunit="14" icon="[object Object]" textalign="left" langlocale="[object Object]" class="ant-input-number-input" disabled="" value="256" aria-valuenow="256"></div></div></div><div title="" class="label-normal-behind " style="width: 10.7143rem;"><span>*</span><div class="lableInput-behind-div"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0px; padding-bottom: 0px;"><div class="label-normal-wrapper label-custom-wrapper" style="width: 7.14286rem;"><div class="ant-input-number labelInput labelInputNumber ant-input-number-disabled" style="min-width: 80px;"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="true" class="ant-input-number-handler ant-input-number-handler-down ant-input-number-handler-down-disabled"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="256" aria-valuemax="8191" step="1" status="normal" pxunit="14" icon="[object Object]" controlwidth="0,13,1" langlocale="[object Object]" class="ant-input-number-input" disabled="" value="256" aria-valuenow="256"></div></div></div></div></div></div></div></div></div></div></div><div class="ant-row" style="margin-top: 30px; row-gap: 0px;"><div class="ant-col"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container undefined max-width-100 " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 9.28571rem; text-align: left;">Detection Area</div><div class="label-object-padding virtual-line-style css-weight-add ">Detection Area</div><div class="label-normal-wrapper undefined max-width-100 label-custom-wrapper" style="width: 15.7143rem;"><div title="" class="labelText-wrapper labelText undefined" value="" pxunit="14" checkstatus="normal" icon="[object Object]" textalign="left" langlocale="[object Object]"><div><button title="Detection Area" type="button" class="ant-btn" style="margin-right: 20px;"><span><span role="img" class="anticon myicon-drawTarget myicon undefined"><svg viewBox="0 0 20 20" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="" style="width: 20px; height: 20px;"><path fill="none" d="M0 0h20v20H0z"></path><path d="M3 16.5a.5.5 0 00.5.5H6v-1h2.6v-.8a2.308 2.308 0 01.03-.37 2.036 2.036 0 01.11-.35 2.547 2.547 0 01.17-.33.983.983 0 01.12-.15H6V6h8v3.02l.65-.66a3.309 3.309 0 01.3-.25c.11-.06.22-.12.33-.17a2.014 2.014 0 01.35-.1A1.5 1.5 0 0116 7.8V6h1V3.5a.5.5 0 00-.5-.5h-2.51v.99H6V3H3.5a.5.5 0 00-.5.5V6h1v8H3zm7 1v-2.3a.5.5 0 01.14-.35l5.5-5.5a.5.5 0 01.71 0l2.29 2.29a.5.5 0 010 .71l-5.5 5.5a.509.509 0 01-.35.15H10.5a.5.5 0 01-.5-.5zm2-1.5h.17l4-4-.17-.18-4 4zm4.5 1h-.52L17 15.98v.52a.508.508 0 01-.5.5z" fill-rule="evenodd"></path></svg></span></span></button><button title="Clear" type="button" class="ant-btn"><span><span role="img" class="anticon myicon-clear myicon undefined"><svg viewBox="0 0 20 20" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="" style="width: 20px; height: 20px;"><path data-name="37081 1374" fill="none" d="M0 0h20v20H0z"></path><g data-name="590779 946"><path data-name="433189 354" d="M18 5h-4.142a3.981 3.981 0 00-7.716 0H2v2h2v10a1 1 0 001 1h10a1 1 0 001-1V7h2zm-8-1a1.993 1.993 0 011.722 1H8.278A1.993 1.993 0 0110 4zm4 12H6V7h8z"></path><path data-name="37081 1612" d="M11 9h2v5h-2z"></path><path data-name="37081 1613" d="M7 9h2v5H7z"></path></g></svg></span></span></button></div></div><div class="virtual-text-wrapper"><div class="labelText" style="white-space: nowrap; position: absolute; top: 0px; visibility: hidden; z-index: -10000; width: auto;"><div><button title="Detection Area" type="button" class="ant-btn" style="margin-right: 20px;"><span><span role="img" class="anticon myicon-drawTarget myicon undefined"><svg viewBox="0 0 20 20" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="" style="width: 20px; height: 20px;"><path fill="none" d="M0 0h20v20H0z"></path><path d="M3 16.5a.5.5 0 00.5.5H6v-1h2.6v-.8a2.308 2.308 0 01.03-.37 2.036 2.036 0 01.11-.35 2.547 2.547 0 01.17-.33.983.983 0 01.12-.15H6V6h8v3.02l.65-.66a3.309 3.309 0 01.3-.25c.11-.06.22-.12.33-.17a2.014 2.014 0 01.35-.1A1.5 1.5 0 0116 7.8V6h1V3.5a.5.5 0 00-.5-.5h-2.51v.99H6V3H3.5a.5.5 0 00-.5.5V6h1v8H3zm7 1v-2.3a.5.5 0 01.14-.35l5.5-5.5a.5.5 0 01.71 0l2.29 2.29a.5.5 0 010 .71l-5.5 5.5a.509.509 0 01-.35.15H10.5a.5.5 0 01-.5-.5zm2-1.5h.17l4-4-.17-.18-4 4zm4.5 1h-.52L17 15.98v.52a.508.508 0 01-.5.5z" fill-rule="evenodd"></path></svg></span></span></button><button title="Clear" type="button" class="ant-btn"><span><span role="img" class="anticon myicon-clear myicon undefined"><svg viewBox="0 0 20 20" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false" class="" style="width: 20px; height: 20px;"><path data-name="37081 1374" fill="none" d="M0 0h20v20H0z"></path><g data-name="590779 946"><path data-name="433189 354" d="M18 5h-4.142a3.981 3.981 0 00-7.716 0H2v2h2v10a1 1 0 001 1h10a1 1 0 001-1V7h2zm-8-1a1.993 1.993 0 011.722 1H8.278A1.993 1.993 0 0110 4zm4 12H6V7h8z"></path><path data-name="37081 1612" d="M11 9h2v5h-2z"></path><path data-name="37081 1613" d="M7 9h2v5H7z"></path></g></svg></span></span></button></div></div></div></div></div></div></div></div></div></div><div class="content-info"><div class="param-title-div"><ul class="ant-menu-overflow ant-menu ant-menu-root ant-menu-horizontal ant-menu-light" role="menu" tabindex="0" data-menu-list="true"><li class="ant-menu-overflow-item ant-menu-item ant-menu-item-selected ant-menu-item-only-child" title="Recognition" role="menuitem" tabindex="-1" data-menu-id="rc-menu-uuid-76803-2-recognition" style="opacity: 1; order: 0;"><span class="ant-menu-title-content">Recognition</span></li><li class="ant-menu-overflow-item ant-menu-item ant-menu-item-only-child" title="Exposure" role="menuitem" tabindex="-1" style="opacity: 1; order: 1;" data-menu-id="rc-menu-uuid-76803-2-exposure"><span class="ant-menu-title-content">Exposure</span></li><li class="ant-menu-overflow-item ant-menu-overflow-item-rest ant-menu-submenu ant-menu-submenu-horizontal ant-menu-submenu-disabled" aria-hidden="true" role="none" style="opacity: 0; height: 0px; overflow-y: hidden; order: 2147483647; pointer-events: none; position: absolute;"><div role="menuitem" class="ant-menu-submenu-title" aria-expanded="false" aria-haspopup="true" data-menu-id="rc-menu-uuid-76803-2-rc-menu-more" aria-controls="rc-menu-uuid-76803-2-rc-menu-more-popup" aria-disabled="true"><span role="img" aria-label="ellipsis" class="anticon anticon-ellipsis"><svg viewBox="64 64 896 896" focusable="false" data-icon="ellipsis" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"></path></svg></span><i class="ant-menu-submenu-arrow"></i></div></li></ul><div aria-hidden="true" style="display: none;"></div></div><div class="param-content-div"><div class="two-column-layout"><div class="ant-row" style="margin-left: 40px; min-width: 500px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container undefined max-width-100 " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="Face Recognition Threshold" class="label-normal " style="width: 13.5714rem; text-align: left;">Face Recognition Threshold</div><div class="label-object-padding virtual-line-style css-weight-add ">Face Recognition Threshold</div><div class="label-normal-wrapper undefined max-width-100 label-auto-wrapper" style="width: auto;"><div title="" class="labelText-wrapper labelText undefined" value="" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]"><div class="ant-input-number" style="width: 220px;"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-down"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="0" aria-valuemax="100" step="1" class="ant-input-number-input" value="85" aria-valuenow="85"></div></div><span> (0-100)</span></div><div class="virtual-text-wrapper"><div class="labelText" style="white-space: nowrap; position: absolute; top: 0px; visibility: hidden; z-index: -10000; width: auto;"><div class="ant-input-number" style="width: 220px;"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-down"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="0" aria-valuemax="100" step="1" class="ant-input-number-input" value="85" aria-valuenow="85"></div></div><span> (0-100)</span></div></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; min-width: 500px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container undefined max-width-100 " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="Max Face Recognition Angle Deviation" class="label-normal " style="width: 13.5714rem; text-align: left;">Max Face Recognition Angle Deviation</div><div class="label-object-padding virtual-line-style css-weight-add ">Max Face Recognition Angle Deviation</div><div class="label-normal-wrapper undefined max-width-100 label-auto-wrapper" style="width: auto;"><div title="" class="labelText-wrapper labelText undefined" value="" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]"><div class="ant-input-number" style="width: 220px;"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-down"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="0" aria-valuemax="90" step="1" class="ant-input-number-input" value="30" aria-valuenow="30"></div></div><span> (0-90)</span></div><div class="virtual-text-wrapper"><div class="labelText" style="white-space: nowrap; position: absolute; top: 0px; visibility: hidden; z-index: -10000; width: auto;"><div class="ant-input-number" style="width: 220px;"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-down"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="0" aria-valuemax="90" step="1" class="ant-input-number-input" value="30" aria-valuenow="30"></div></div><span> (0-90)</span></div></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; min-width: 500px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Anti-spoofing Level</div><div class="label-object-padding virtual-line-style css-weight-add ">Anti-spoofing Level</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 27.5rem;"><div class="sdd-radioGroup-container "><div class="ant-radio-group ant-radio-group-outline labelRadioGroup wrapRadio" style="width: 100%;"><label class="ant-radio-wrapper"><span class="ant-radio"><input type="radio" class="ant-radio-input" value="0" checked=""><span class="ant-radio-inner"></span></span><span><span class="labelRadio-content-wrapper" name="0" style="width: auto;"><div title="" class="labelText-wrapper labelText undefined">Close</div><div class="labelText" style="white-space: nowrap; position: absolute; top: 0px; visibility: hidden; z-index: -10000; width: auto;">Close</div></span></span></label><label class="ant-radio-wrapper ant-radio-wrapper-checked"><span class="ant-radio ant-radio-checked"><input type="radio" class="ant-radio-input" value="63"><span class="ant-radio-inner"></span></span><span><span class="labelRadio-content-wrapper" name="63" style="width: auto;"><div title="" class="labelText-wrapper labelText undefined">General</div><div class="labelText" style="white-space: nowrap; position: absolute; top: 0px; visibility: hidden; z-index: -10000; width: auto;">General</div></span></span></label><label class="ant-radio-wrapper"><span class="ant-radio"><input type="radio" class="ant-radio-input" value="127"><span class="ant-radio-inner"></span></span><span><span class="labelRadio-content-wrapper" name="127" style="width: auto;"><div title="" class="labelText-wrapper labelText undefined">High</div><div class="labelText" style="white-space: nowrap; position: absolute; top: 0px; visibility: hidden; z-index: -10000; width: auto;">High</div></span></span></label><label class="ant-radio-wrapper"><span class="ant-radio"><input type="radio" class="ant-radio-input" value="255"><span class="ant-radio-inner"></span></span><span><span class="labelRadio-content-wrapper" name="255" style="width: auto;"><div title="" class="labelText-wrapper labelText undefined">Ultra High</div><div class="labelText" style="white-space: nowrap; position: absolute; top: 0px; visibility: hidden; z-index: -10000; width: auto;">Ultra High</div></span></span></label></div></div></div></div></div></div><div class="ant-row lableInput-behind-row" style="margin-left: 40px; min-width: 500px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Valid Face Interval (sec)</div><div class="label-object-padding virtual-line-style css-weight-add ">Valid Face Interval (sec)</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="ant-input-number labelInput labelInputNumber " style="width: 100%;"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-down"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="1" aria-valuemax="60" step="1" status="normal" pxunit="14" icon="[object Object]" textalign="left" langlocale="[object Object]" class="ant-input-number-input" value="3" aria-valuenow="3"></div></div></div><div title="" class="label-normal-behind " style="width: 5.71429rem;">(1-60)</div></div></div></div><div class="ant-row lableInput-behind-row" style="margin-left: 40px; min-width: 500px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Invalid Face Interval (sec)</div><div class="label-object-padding virtual-line-style css-weight-add ">Invalid Face Interval (sec)</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="ant-input-number labelInput labelInputNumber " style="width: 100%;"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-down"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="0" aria-valuemax="60" step="1" status="normal" pxunit="14" icon="[object Object]" textalign="left" langlocale="[object Object]" class="ant-input-number-input" value="10" aria-valuenow="10"></div></div></div><div title="" class="label-normal-behind " style="width: 5.71429rem;">(0-60)</div></div></div></div><div class="ant-row lableInput-behind-row" style="margin-left: 40px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Recognition Distance</div><div class="label-object-padding virtual-line-style css-weight-add ">Recognition Distance</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="ant-select labelSelect ant-select-single ant-select-show-arrow" status="normal" pxunit="14" type="select" langlocale="[object Object]" style="width: 100%;"><div class="ant-select-selector"><span class="ant-select-selection-search"><input autocomplete="off" type="search" class="ant-select-selection-search-input" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_1_list" aria-autocomplete="list" aria-controls="rc_select_1_list" aria-activedescendant="rc_select_1_list_0" readonly="" unselectable="on" value="" id="rc_select_1" style="opacity: 0;"></span><span class="ant-select-selection-item"><span name="150">1.5 meters</span></span></div><span class="ant-select-arrow" unselectable="on" aria-hidden="true" style="user-select: none;"><span role="img" aria-label="down" class="anticon anticon-down ant-select-suffix"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Mask mode</div><div class="label-object-padding virtual-line-style css-weight-add ">Mask mode</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="ant-select labelSelect ant-select-single ant-select-show-arrow" status="normal" pxunit="14" textalign="left" type="select" langlocale="[object Object]" style="width: 100%;"><div class="ant-select-selector"><span class="ant-select-selection-search"><input autocomplete="off" type="search" class="ant-select-selection-search-input" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_2_list" aria-autocomplete="list" aria-controls="rc_select_2_list" aria-activedescendant="rc_select_2_list_0" readonly="" unselectable="on" value="" id="rc_select_2" style="opacity: 0;"></span><span class="ant-select-selection-item"><span name="2">No Authorization without Wearing Face Mask</span></span></div><span class="ant-select-arrow" unselectable="on" aria-hidden="true" style="user-select: none;"><span role="img" aria-label="down" class="anticon anticon-down ant-select-suffix"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; min-width: 500px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container undefined max-width-100 " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Face Mask Threshold</div><div class="label-object-padding virtual-line-style css-weight-add ">Face Mask Threshold</div><div class="label-normal-wrapper undefined max-width-100 label-auto-wrapper" style="width: auto;"><div title="" class="labelText-wrapper labelText undefined" value="" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]"><div class="ant-input-number" style="width: 220px;"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-down"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="0" aria-valuemax="100" aria-valuenow="75" step="1" class="ant-input-number-input" value="75"></div></div><span> (0-100)</span></div><div class="virtual-text-wrapper"><div class="labelText" style="white-space: nowrap; position: absolute; top: 0px; visibility: hidden; z-index: -10000; width: auto;"><div class="ant-input-number" style="width: 220px;"><div class="ant-input-number-handler-wrap"><span unselectable="on" role="button" aria-label="Increase Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-up"><span role="img" aria-label="up" class="anticon anticon-up ant-input-number-handler-up-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"></path></svg></span></span><span unselectable="on" role="button" aria-label="Decrease Value" aria-disabled="false" class="ant-input-number-handler ant-input-number-handler-down"><span role="img" aria-label="down" class="anticon anticon-down ant-input-number-handler-down-inner"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div><div class="ant-input-number-input-wrap"><input autocomplete="off" role="spinbutton" aria-valuemin="0" aria-valuemax="100" aria-valuenow="75" step="1" class="ant-input-number-input" value="75"></div></div><span> (0-100)</span></div></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Snapshot Mode</div><div class="label-object-padding virtual-line-style css-weight-add ">Snapshot Mode</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="sdd-swtich-contianer"><button value="false" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]" type="button" role="switch" aria-checked="false" class="ant-switch"><div class="ant-switch-handle"></div><span class="ant-switch-inner"><span></span></span></button></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="Face Snapshot Enhancement" class="label-normal " style="width: 13.5714rem; text-align: left;">Face Snapshot Enhancement</div><div class="label-object-padding virtual-line-style css-weight-add ">Face Snapshot Enhancement</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="sdd-swtich-contianer"><button value="false" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]" type="button" role="switch" aria-checked="false" class="ant-switch"><div class="ant-switch-handle"></div><span class="ant-switch-inner"><span></span></span></button></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Beautifier</div><div class="label-object-padding virtual-line-style css-weight-add ">Beautifier</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="sdd-swtich-contianer"><button value="false" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]" type="button" role="switch" aria-checked="false" class="ant-switch"><div class="ant-switch-handle"></div><span class="ant-switch-inner"><span></span></span></button></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Enable Helmet Detection</div><div class="label-object-padding virtual-line-style css-weight-add ">Enable Helmet Detection</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="sdd-swtich-contianer"><button value="false" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]" type="button" role="switch" aria-checked="false" class="ant-switch"><div class="ant-switch-handle"></div><span class="ant-switch-inner"><span></span></span></button></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Multi-face Recognition</div><div class="label-object-padding virtual-line-style css-weight-add ">Multi-face Recognition</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="sdd-swtich-contianer"><button value="false" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]" type="button" role="switch" aria-checked="false" class="ant-switch"><div class="ant-switch-handle"></div><span class="ant-switch-inner"><span></span></span></button></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Night Mode</div><div class="label-object-padding virtual-line-style css-weight-add ">Night Mode</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="sdd-swtich-contianer"><button value="true" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]" type="button" role="switch" aria-checked="true" class="ant-switch ant-switch-checked"><div class="ant-switch-handle"></div><span class="ant-switch-inner"><span></span></span></button></div></div></div></div></div><div class="ant-row" style="margin-left: 40px; row-gap: 0px;"><div class="label-div-Container label-v4-version label-ant-version"><div class="label-normal-container " style="padding-top: 0.571429rem; padding-bottom: 0.571429rem;"><div title="" class="label-normal " style="width: 13.5714rem; text-align: left;">Smart Screen Light Up</div><div class="label-object-padding virtual-line-style css-weight-add ">Smart Screen Light Up</div><div class="label-normal-wrapper label-custom-wrapper" style="width: 15.7143rem;"><div class="sdd-swtich-contianer"><button value="true" pxunit="14" checkstatus="normal" icon="[object Object]" langlocale="[object Object]" type="button" role="switch" aria-checked="true" class="ant-switch ant-switch-checked"><div class="ant-switch-handle"></div><span class="ant-switch-inner"><span></span></span></button></div></div></div></div></div></div><div class="two-column-layout"></div></div></div></div><div class="fixed-button halfwidth"><button type="button" class="ant-btn ant-btn-primary right"><span>Apply</span></button><button type="button" class="ant-btn left"><span>Refresh</span></button><button type="button" class="ant-btn right"><span>Default</span></button></div></div></div></div></div>,为什么e.target.innerHTML.test(/div/)会报错,Uncaught TypeError: e.target.innerHTML.test is not a function
最新发布
05-30
### 问题分析 在 JavaScript 中,`e.target.innerHTML` 是一个字符串,表示触发事件的目标元素的 HTML 内容。然而,字符串对象并没有 `test` 方法,这是正则表达式对象的方法。因此,当尝试调用 `e.target.innerHTML.test(/div/)` 时,会抛出 `'Uncaught TypeError: e.target.innerHTML.test is not a function'` 错误[^1]。 ### 原因解释 `test` 方法是正则表达式的原生方法,用于测试一个字符串是否匹配该正则表达式。由于 `innerHTML` 是一个字符串,而字符串对象本身没有 `test` 方法,所以直接调用会导致错误。正确的做法是将正则表达式作为主体,并对字符串进行测试[^2]。 ### 正确解决方案 以下是正确的代码实现方式: ```javascript // 使用正则表达式测试 innerHTML 是否包含 'div' if (/div/.test(e.target.innerHTML)) { console.log("innerHTML 包含 div 标签"); } else { console.log("innerHTML 不包含 div 标签"); } ``` 在此代码中,正则表达式 `/div/` 被用来调用 `test` 方法,传入的参数是 `e.target.innerHTML`,这是一个字符串。这样可以避免 `'Uncaught TypeError: e.target.innerHTML.test is not a function'` 错误[^3]。 ### 注意事项 如果需要更精确地匹配 `<div>` 标签而不是简单地查找 "div" 字符串,可以使用更复杂的正则表达式。例如: ```javascript const regex = /<div\b[^>]*>/i; // 匹配 <div> 标签 if (regex.test(e.target.innerHTML)) { console.log("innerHTML 包含 div 标签"); } else { console.log("innerHTML 不包含 div 标签"); } ``` 此正则表达式确保只匹配 `<div>` 标签,而不会误匹配其他包含 "div" 的内容[^4]。 ### 示例代码 以下是一个完整的示例代码片段,展示如何正确使用正则表达式来检测 `innerHTML` 是否包含 `<div>` 标签: ```javascript document.addEventListener('click', function(e) { const regex = /<div\b[^>]*>/i; if (regex.test(e.target.innerHTML)) { console.log("innerHTML 包含 div 标签"); } else { console.log("innerHTML 不包含 div 标签"); } }); ``` ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值