摘要:
//DynamicLoad File(css,js) //Edit By dj_Yang function DynamicLoad() { var Self = this; this.Load = function(type, src) { var objDynamic; if (type == "js" || type == "vbs") { objDynamic = document.createElement("script"); objDynamic.src = src; if (type == "js") 阅读全文
摘要:
String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, "");}String.prototype.LTrim = function() { return this.replace(/(^\s*)/g, "");}String.prototype.RTrim = function() { return this.replace(/(\s*$)/g, "");} 阅读全文
摘要:
//AJAX request for the city datafunction ajaxforget(cn) { var xmlhttp_request = ""; try { if (window.ActiveXObject) { for (var i = 5; i; i--) { try { if (i == 2) { xmlhttp_request = new ActiveXObject("Microsoft.XMLHTTP"); } else { xmlhttp_request = new ActiveXObject("Msxml2. 阅读全文
摘要:
<?php header("content-Type: text/html; charset=gb2312"); include_once("DBHelper.php"); include_once("test_array.php");?> <!--==========业务逻辑==========--><?php$conn = new ADOConnection;$conn -> PConnect("localhost","root","weoffi 阅读全文
摘要:
<?php header("content-Type: text/html; charset=gb2312"); include_once("DBHelper.php");?> <!--==========业务逻辑==========--><?php$conn = new ADOConnection;$conn -> PConnect("localhost","root","weoffice","eoffice");//数据库连接$conn 阅读全文
摘要:
//DBHelper.php<?phpclass ADOConnection{//打开数据库的连接function PConnect($ip,$user,$pwd,$database){$db = mysql_connect($ip,$user,$pwd);if(!$db) {print "在连接到数据库服务器时,产生错误".mysql_error();exit;}$link = mysql_select_db($database,$db);if(!$link) {print "在连接上服务器,选择数据库时出现错误".mysql_error();e 阅读全文
摘要:
DynamicLoad.js文件代码如下:function DynamicLoad(){//属性var Self=this; //对象自身//功能:加载指定的文件//参数:src——需要被加载的文件//返回:(无)this.Load=function(src){if(Self.IsLoaded(src)) //判断该文件是否已经加载了{ Self.OnLoaded(src); return;}else //如果没有加载,动态创建{ var objDynamic; //动态创建的对象 var type=Self.GetSrcType(src); //文件类型 if(type=="js& 阅读全文