我在一个页面上有单选按钮,当链接回页面时会清除。我想确保他们继续检查。这里的问题是它们是动态的,我不习惯。有一个循环最多可循环5次。
这是我尝试过的动态:
<cfif isDefined("session.checkout.info["FLResident_" & Add]")
AND session.checkout.info["FLResident_" & Add] EQ "Yes" >checked</cfif>
<cfif structKeyExists("session.checkout.info["FLResident_" & Add]")
AND session.checkout.info["FLResident_" & Add] EQ "Yes" >checked</cfif>
HTML
<label for="FLResident_<cfoutput>#Add#</cfoutput>">
Are you a Florida resident?
</label>
<cfoutput>
<input type="radio" value="Yes" name="FLResident_#Add#"
id="FLResident_#Add#"
required="yes"
<cfif isDefined("session.checkout.info["FLResident_" & Add]")
AND session.checkout.info["FLResident_" & Add] EQ "Yes" >
checked
</cfif>/>
</cfoutput>
<label for="FLResident_<cfoutput>#Add#</cfoutput>">Yes</label>
<cfoutput>
<input type="radio" value="No" name="FLResident_#Add#"
id="noFLResident_#Add#"
<cfif isDefined("session.checkout.info["FLResident_" & Add]")
AND session.checkout.info["FLResident_" & Add] EQ "No" >
checked
</cfif>/>
</cfoutput>
<label for="noFLResident_<cfoutput>#Add#</cfoutput>">No</label>
谁能告诉我哪里出错?