In Javascript, is it possible to pass a variable into [removed] “src” parameter?

后端 未结 4 1848
萌比男神i
萌比男神i 2021-01-18 18:42

Is it possible in Javascript to pass a variable through the src parameter? ie.



        
4条回答
  •  无人共我
    2021-01-18 19:21

    Sure. But the only way you can access that parameter though is through server-side. So, make twitter.js a PHP page (using mod_rewrite or whatever) that grabs $_GET['handle'] and then serves itself as Content-Type: text/javascript and just dump the contents of the js.

提交回复
热议问题