How can I inspect the values of tags during the submit of a form using Chrome Dev Tools?

孤街醉人 提交于 2019-12-21 15:17:09

问题


During a page's "dormant" state, I can inspect the values of any tag by entering its id in Chrome Dev Tools' console tab, like so, e.g. for a tag with the name "BeginDate":

0) Enter "BeginDate" in the console tab 1) Mash the key

...and I see the whole shebang:

<input alt="date-us" data-val="true" data-val-regex="End Date must be in the format &amp;quot;m/d/yyyy&amp;quot;" data-val-regex-pattern="[0-9]*[0-9]/[0-9]*[0-9]/[0-9]{4}" data-val-required="End Date must be in the format &amp;quot;m/d/yyyy&amp;quot;" id="EndDate" name="EndDate" style="width: 164px;" type="text" value="5/14/2013" class="hasDatepicker">

So it shows the value, which is the part I'm interested in, is today's date.

What I want to inspect, though, is just what is being passed/posted when the form's Submit button is pressed; I believe this would be, in asp.net, the contents of the Request object, but how can I see these vals using Chrome Dev Tools?

I right-clicked in the console and selected "Log XMLHTTPRequests" and "Preserve log upon navigation" but...are they logged? If so, where are they? I see nothing in the Console tab...

UPDATE

Thanks to David Ziemann, here's what I see:


回答1:


The Network tab will show you any network communication. Within that you can select the request and view the headers which should include the form data.



来源:https://stackoverflow.com/questions/16549934/how-can-i-inspect-the-values-of-tags-during-the-submit-of-a-form-using-chrome-de

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!