现在的位置: 首页 > 综合 > 正文

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

2012年12月28日 ⁄ 综合 ⁄ 共 589字 ⁄ 字号 评论关闭

<%
'功能:用来在选择<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

抱歉!评论已关闭.