国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > JS > 正文

Code:loadScript( )加載js的功能函數(shù)

2024-09-06 12:43:32
字體:
來源:轉載
供稿:網(wǎng)友
代碼如下:
<script type="text/javascript"> 
/** 
 * function loadScript 
 * Copyright (C) 2006 Dao Gottwald 
 * 
 * This library is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU Lesser General Public 
 * License as published by the Free Software Foundation; either 
 * version 2.1 of the License, or (at your option) any later version. 
 * 
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
 * Lesser General Public License for more details. 
 * 
 * You should have received a copy of the GNU Lesser General Public 
 * License along with this library; if not, write to the Free Software 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 
 * 
 * Contact information: 
 * Dao Gottwald <dao at design-noir.de> 
 * Herltestra?e 12 
 * D-01307, Germany 
 * 
 * @version 1.5 
 * @url http://design-noir.de/webdev/JS/loadScript/ 
 */ 

function loadScript (url, callback) { 
  var script = document.createElement('script'); 
  script.type = 'text/javascript'; 
  /* should be application/javascript 
   * http://www.rfc-editor.org/rfc/rfc4329.txt 
   * http://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=84613 
   */ 
  if (callback) 
    script.onload = script.onreadystatechange = function() { 
      if (script.readyState && script.readyState != 'loaded' && script.readyState != 'complete') 
        return; 
      script.onreadystatechange = script.onload = null; 
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 枝江市| 伊春市| 武隆县| 玉环县| 蓝山县| 鲜城| 七台河市| 林芝县| 同江市| 高安市| 韶山市| 子长县| 密云县| 博乐市| 莱阳市| 虹口区| 乌恰县| 仁怀市| 巩义市| 镶黄旗| 江达县| 凤山县| 吉木乃县| 雷波县| 安仁县| 璧山县| 密云县| 合阳县| 罗甸县| 邵阳市| 兴宁市| 哈尔滨市| 高阳县| 神农架林区| 克拉玛依市| 梅河口市| 盐源县| 乌苏市| 扎赉特旗| 常州市| 长海县|