ASP

ASP - 값을 받아서 check box, select box 체크 되어있기

yes or yes 2020. 8. 10. 16:22
반응형

check box 변수로 checked 해주기

 


<tr>
 <td>
  <input type="checkbox" <% If 변수 = "Y" Then %>checked<% End If %>>  

  <input type="checkbox" <% If 변수 = "N" Then %>checked<% End If %>>
  </td>
</tr>

 

 

select box 변수로 selected 해주기

 


<select> 
 <option value="1" <%If 변수 ="1" Then%>selected<%End if%>>변수1</option> 
 <option value="2" <%If 변수 ="2" Then%>selected<%End if%>>변수2</option> 
 <option value="3" <%If 변수 ="3" Then%>selected<%End if%>>변수3</option> 
 <option value="4" <%If 변수 ="4" Then%>selected<%End if%>>변수4</option> 
</select> 

 

반응형