怎么获取网页js脚本里input的变量值

如何获取网页js脚本里input的变量值?
http://topic.****.net/u/20091102/00/4c41c3e8-87ae-482d-9886-9496dd7f11a6.html?57630
大家看这里,帮我解决一下问题,谢谢了

问题
--------------------------------------------------
我的程序里用了Web Browser控件,网页里有这么一段代码 
<input type=hidden name="SELECT_ID" value=""> 
js脚本会设置SELECT_ID的值。 
我的问题是如何在vc里获取这个SELECT_ID的值。 
是不是要先得到IHTMLInputElement接口,然后get_value?
--------------------------------------------------

------解决方案--------------------
首先得到页面中的所有input元素

C/C++ code

CComPtr<IHTMLElementCollection> spCollAll;
spCollAll = m_spDoc2->get_all(&spCollAll);

CComPtr<IDispatch> spDispAllInput;
spCollAll->tags(_variant_t(_T("img"), &spDispAllInput);

CComQIPtr<IHTMLElementCollection> spCollAllInput = spDispAllInput;