[导入]ASP常用函数:RadioScript()

<%
'功能:用来在选择<input type="radio">
'来源:http://jorkin.reallydo.com/article.asp?id=563

Function RadioScript(ByVal FormElement, ByVal ElementValue)
    
RadioScript = "<scr" & "ipt language=""javascript"" type=""text/javascript"">" & vbCrLf
    RadioScript = RadioScript & "var Jorkin='" & ElementValue & "';" & vbCrLf
    RadioScript = RadioScript & "  for(i = 0; i < " & FormElement & ".length; i++){" & vbCrLf
    RadioScript = RadioScript & "    if (Jorkin == " & FormElement & "[i].value){" & vbCrLf
    RadioScript = RadioScript & "      " & FormElement & "[i].checked = true}}</scr" & "ipt>" & vbCrLf
End Function
%>


文章来源: http://Jorkin.Reallydo.Com/default.asp?id=563

你可能感兴趣的:(script)