Y星人の工作語錄

別理我, 我只是一個愛發勞騷的Y星人

9月
09

Passing JavaScript arguments via the src attribute

Posted by YuanYuan

A little project need this. (non jQuery)

include an js with parameter, ex: all.js?a=1&b=2&v=1
and you can control all.js with parameter with dymanic js, css
ex: if  v=1, include v1.js realtime. v=2, include v2.js …

now, you can do anything, that you want to do.  :)

others read.

that’s it!

Add A Comment