网站建设

javascript,JS如何提取字符串

daimafengzi · 3月18日 · 2022年 · 本文共1606个字 · 预计阅读6分钟7098次已读
<html>
<body>

<script type="text/javascript">

var str="Cookie: __NSWJ=%2BelnCrTFdK0%%2Fy08NV7GmkoOEry%2FH8s3Okdi0sTbzSBUZgZfbn8fxzCR8UbAAAAAw%3D%3D; apptype=2; appver=9.4.40.1050; bottom_navigation=true; browseType=3; c=a; client_key=63b2bdd7; countryCode=cn; country_code=cn; cs=false; darkMode=false; did=90070DE7-38C9-4F46-9F76-2E0898EB3E6A; egid=DFPF58515626711F21EBFF583696E24B44541BDF186E1FBEA37CE9B7299EEA48; foreign=0; gid=; isp=CUCC; kpf=IPHONE; kpn=NEBULA; kuaishou.api_st=dbIYrudK16AcBFf4YvmnqFkjzOhaEWT5zrh44NfjRyiHvIFQmfcHYCjbuSGdtqRI-6BX3sDcvOD_wq9oIqQ2VOby_ZMRNApYXphEI_rY39k6p3PALGzhjg-pjdnh_BJt4rR7Zw4XN_pZ1S5uaVHZUNL3tHCPNIlIhoS_p-fQlhnTN25qC7aiHAv_WWtIiANSiDVFNqVRS1BxdGq2OzqahQglw_DWBw65GfE8QWxwCgFMAE; kuaishou.h5_st=Cg5rdWFpc2hvdS5oNS5zdBKgAbczsDzXCVsBwO-JQda0pPsznRxoAmjtOS2FrJTpev09V82TDscdcYB1FVbOpr8_FS1iCVGT4YJQhm5WoSlZ8CL1--oit4lNhjMbCykaEi0FTenUzzyakcPnzsVR98aTkSIgAev4kgAabe6P_qXQsrYRf2JCmCy5PYKfd-gf6G9ch3koBTAB; kuaishou.sixin.login_st=ChdrdWFpc2hvdS5zaXhpbi5sb2dpbi5zdBKgAcWT9k9jNr8esf9XgOMOOZlD8Q7mzHVRn7Yh8BUIqvF5RKc_pnxe9It0vfBoUKCW8nhrvm5tC3dzQrC9-d3r5rYJoAyYNkUhndv2r-stGCSzMvnjN4d-lXmAz0VyxT76-; language=zh-Hans-CN%3Bq%3D1; lat=0.000000; lon=0.000000; mcc=46001; mod=iPhone9%2C2; net=WIFI; os=15.3.1; power_mode=0; session_id=1262F24B-F908-4F39-B63C-798553424130; sh=2208; sid=1262F24B-F908-4F39-B63C-798553424130; sw=1242; sys=iOS_15.3.1; token=-EorwFqG2tm-Sd--fQlhnTN25qC7aiHAv_WWtIiCrbRaZp4lVSEGup6WwIi25nLxrDZbjfl32Ab0OzsBGVCgFMAE; ud=2681542910; userId=2681542910; ver=9.4"

var datals = str.split(';');
var fid=datals[18]
//document.write(datals[11])
document.write(fid.replace('did=', ''))
</script>

</body>
</html>

0 条回应