I have a HTML form which consists of divs and ul element. I want to get all the data on a button click. I know how to get when there is input type element involved but how to deal with only div's and list elements?
html
<div class="boxInner">
<form id="my_form" method="POST">
<div class="inner-box-header">
%s
</div>
<div class="inner-sub-header">
%s
</div>
<div class="inner-box-footer">
<ul>
<li>
<img src="images/assets_icon_location.png" style="height:13px;width:10px;float:left;margin-right:3px;" alt="">
<span class="image-side-text">%s</span></li>
<li id="ip-location">⚫<span>%s - %s</span></li>
</ul>
</div>
<div class="titleBox">
<input type="submit" value="Click" name="ws_butt" />
</div>
</form>
</div>
python script
request_body_size = int(environ.get('CONTENT_LENGTH', 0))
request_body = environ['wsgi.input'].read(request_body_size)
d = parse_qs(request_body)
How to get all the elements in the request body and retrieve while parsing? Is there any other way to tackle this?
I thought of putting input
type="hidden"
with every value I need and that will do the job for me.