Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ʹÓÃJavaScriptÁ¬½ÓSqlServerÊý¾Ý¿â¡£Ö´ÐÐCRUD²Ù×÷¡£

function db()
{
//»î¶¯±àºÅ
var activeid = Request.Form("activeid");
//̞
var username = Request.Form("username");
//ÊÖ»úºÅÂë
var mobile = Request.Form("mobile");
var conn= Server.CreateObject("ADODB.connection");
var rs= Server.CreateObject("adodb.recordset");
var userid = getUserIdByName(username);
conn.open("PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=123456;DATABASE=test");
var sql = "insert into user (activeid,userid,chrtel,dtappenddate) values("+activeid+","+userid+",'"+mobile+"',getdate())";
rs.open(sql,conn);
rs.close();
conn.close();
rs=null;
conn=null;
}
function getUserIdByName(username)
{
var conn= Server.CreateObject("ADODB.connection");
var rs= Server.CreateObject("adodb.recordset");
conn.open("PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=123456;DATABASE=test");
var sql = "select userid from RegUsers where chrname='"+username+"'";
rs.open(sql,conn);
if(!rs.EOF)
{
return rs("userid");
}
rs.close();
conn.close();
rs=null;
conn=null;
}
function baoming()
{
var conn= Server.CreateObject("ADODB.connection");
var rs= Server.CreateObject("adodb.recordset");
conn.open("PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=123456;DATABASE=test");
var sql = "select userid,activeid,chrtel,CONVERT(varchar(30),dtappenddate,20) as dtappenddate from baoming order by id desc";
rs.open(sql,conn);
var i =1;
while(!rs.EOF && i<31)
{
Response.Write("<tr align='center'>");
Response.Write("<td>"+i +"</td>");
Response.Write("<td>"+ getUserNameById(rs('userid')) +"</td>");
Response.Write("<td>"+ getActi


Ïà¹ØÎĵµ£º

ͨ¹ýjavascript»ñµÃurl²ÎÊý

Ò³ÃæÌá½»Êý¾ÝÒ»°ãÓÐÁ½ÖÖ·½·¨£ºget,post¡£post¾ÍÊÇËùνµÄformÌá½»£¬Ê¹ÓÃÊÓͼ£»getÊÇͨ¹ýurlÌá½»¡£
Get·½·¨Ò»°ãÓúǫ́´úÂ루Èçasp,asp.net£©»ñµÃ²ÎÊý£¬´úÂëºÜ¼òµ¥£ºRequest.QueryString["id"];¼´¿É»ñÈ¡¡£ 
ÓÐЩʱºòÐèÒªÖ±½ÓÔÚǰ̨»ñÈ¡url²ÎÊý£¬ÒªÓõ½javascript£¬jsûÓÐÖ±½Ó»ñÈ¡url²ÎÊýµÄ·½·¨£¬ÄÇô£¬ÎÒÃÇÈçºÎͨ¹ýjs ......

phpÖеÄevalºÍJavaScriptÖеÄeval

phpÖеÄevalºÍJavaScriptÖеÄevalÇø±ð£º
Definition and Usage

¶¨ÒåºÍÓ÷¨
The eval() function evaluates a
string as PHP code.
eval()º¯ÊýµÄ×÷ÓÃÊÇ£º·µ»ØÓëPHP´úÂëÏà¶ÔÓ¦µÄ×Ö·û´®¡£
The string
must be valid PHP code and must end with semicolon.
Õâ¸ö×Ö·û´®±ØÐëÊÇÓÐЧµÄPHP´úÂ룬
²¢ÇÒ±ØÐëÒԷֺŽáÊø¡ ......

JavaScriptµÄBASE64

**
* ÎÒÔÚÍøÉÏ¿´µ½¹ýºÜ¶àBASE64µÄJavaScriptËã·¨£¬¶¼¾õµÃ²»ÂúÒ⣬ÓÚÊÇ×Ô¼ºÐ´ÁËÒ»¸ö£¬ÔÚÕâÀï·ÖÏíһϡ£
* ÎҵĴúÂëÔÚÖÊÁ¿µÄЧÂʶ¼½Ï¸ß£¬Ã»ÓÐһЩÈßÓàµÄ²Ù×÷¡£×ÜÌåÀ´½²ÎÒ¾õµÃ·Ç³£²»´í¡£
* Èç¹û´ó¼ÒÓÐʲô²»¶®µÄµØ·½¿ÉÒÔÎÊÎÒ¡£
*/
var BASE64={
    /**
     * ´Ë±äÁ¿Îª±àÂëµÄ ......

JavaScriptѧϰ±Ê¼Ç£¨Áù£©

1.DOMÊÇÕë¶ÔXMLµÄ»ùÓÚÊ÷µÄAPI¡£Ê¹ÓÃDOM£¬Ö»Ðè½âÎö´úÂëÒ»´ÎÀ´´´½¨Ò»¸öÊ÷µÄÄ£ÐÍ¡£ÔÚÕâ¸ö³õʼ½âÎö¹ý³ÌÖ®ºó£¬XMLÒѾ­Íêȫͨ¹ýDOMÄ£ÐͱíÏÖ³öÀ´£¬Í¬Ê±Ò²²»ÔÙÐèҪԭʼµÄ´úÂë¡£
   NB
£ºDOMÊÇÓïÑÔÎ޹صÄAPI£¬Ëü²¢²»ÓëJava¡¢JavaScript»òÆäËûÓïÑ԰󶨡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ