abc0123xyz

求大佬指点

  •  
  •   abc0123xyz · Oct 20, 2022 · 1086 views
    This topic created in 1323 days ago, the information mentioned may be changed or developed.

    如题,想从 html 中获取 token 的值,大概类似于下边的样子

    <!DOCTYPE html>
    <html>
    <body>
    
    <h2>xxx</h2>
    
    </body>
    <script>
    	function myFunction() {
        	token = "xxxxxxxx"
    	}
    </script>
    </html>
    
    
    jiurenmeng
        1
    jiurenmeng  
       Oct 20, 2022
    token = "(.*?)"
    abc0123xyz
        2
    abc0123xyz  
    OP
       Oct 20, 2022
    @jiurenmeng #1 感谢大佬
    wdssmq
        3
    wdssmq  
       Oct 23, 2022
    @jiurenmeng token = "([^"]+)"

    感觉这样更科学些。。
    abc0123xyz
        4
    abc0123xyz  
    OP
       Oct 24, 2022
    @wdssmq #3 感谢大佬
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5377 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 07:42 · PVG 15:42 · LAX 00:42 · JFK 03:42
    ♥ Do have faith in what you're doing.