php curl 获取javascript动态生成的值

WBOY
Release: 2016-06-06 20:32:06
Original
1452 people have browsed it

我在做一个青果教务系统的模拟登录,使用php的curl,我是新手,边学边做的,它的登录页面有几个hidden的值,发现有一个值是javascript动态生成的,用curl抓取的时候是空的,我要怎么抓取这个值?
求答者,感谢。
这是页面生成这个值的javascript

<code>function chkpwd(obj) {  if(obj.value!='')  {    var s=md5(document.all.txt_asmcdefsddsd.value+md5(obj.value).substring(0,30).toUpperCase()+'13714').substring(0,30).toUpperCase();   document.all.dsdsdsdsdxcxdfgfg.value=s;} else { document.all.dsdsdsdsdxcxdfgfg.value=obj.value;} }  function chkyzm(obj) {  if(obj.value!='') {   var s=md5(md5(obj.value.toUpperCase()).substring(0,30).toUpperCase()+'13714').substring(0,30).toUpperCase();   document.all.fgfggfdgtyuuyyuuckjg.value=s;} else {    document.all.fgfggfdgtyuuyyuuckjg.value=obj.value.toUpperCase();}}//-->

</code>
Copy after login
Copy after login

回复内容:

我在做一个青果教务系统的模拟登录,使用php的curl,我是新手,边学边做的,它的登录页面有几个hidden的值,发现有一个值是javascript动态生成的,用curl抓取的时候是空的,我要怎么抓取这个值?
求答者,感谢。
这是页面生成这个值的javascript

<code>function chkpwd(obj) {  if(obj.value!='')  {    var s=md5(document.all.txt_asmcdefsddsd.value+md5(obj.value).substring(0,30).toUpperCase()+'13714').substring(0,30).toUpperCase();   document.all.dsdsdsdsdxcxdfgfg.value=s;} else { document.all.dsdsdsdsdxcxdfgfg.value=obj.value;} }  function chkyzm(obj) {  if(obj.value!='') {   var s=md5(md5(obj.value.toUpperCase()).substring(0,30).toUpperCase()+'13714').substring(0,30).toUpperCase();   document.all.fgfggfdgtyuuyyuuckjg.value=s;} else {    document.all.fgfggfdgtyuuyyuuckjg.value=obj.value.toUpperCase();}}//-->

</code>
Copy after login
Copy after login

用原来的js还原出来了

你是薛老师?或者是吕梁学院的?

模拟登录做成功没

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!