<form action="DJ" method="post"> <input type="radio" name="gender" value="male" checked>男 <input type="radio" name="gender" value="female"> 女 <input type="radio" name="gender" value="unkown"> 未知 <p></p> <input type="submit" value="提交"> </form>
//DJ 三选一 procedure TWebModule1.WebModule1WebActionItem1Action(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); var s: string; begin // S := Request.ContentFields.Text; //gender=female name=Value if Request.ContentFields.Values['gender']='male' then s:='男' else if Request.ContentFields.Values['gender']='female' then s:='女' else if Request.ContentFields.Values['gender']='unkown' then s:='未知' ; Response.ContentType := 'text/html; charset="UTF-8"'; Response.Content := s; end;
标签:三选,gender,Request,Values,webBroker,radio,ContentFields,Response From: https://www.cnblogs.com/tulater/p/18645445