[导入]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
posted @ 2009-01-02 22:22  pboy2925  阅读(187)  评论(0编辑  收藏  举报