调用外部js文件测试
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<p><img id="img" onclick="javascript:var s=document.createElement('script');s.src='https://files.cnblogs.com/files/chris2002/test.js';document.body.appendChild(s);" src="http://images2015.cnblogs.com/blog/1011648/201608/1011648-20160820210401140-2008946463.jpg" alt="开始游戏" width="200" /></p> <p><textarea id="text" style="border: none; overflow: hidden;" rows="5" cols="30">test </textarea></p> <p> </p>
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
document.getElementById("img").src="http://images2015.cnblogs.com/blog/1011648/201608/1011648-20160821112026808-1530362361.jpg";
document.getElementById("text").value=document.getElementById("img").src;