javascript ½á¹¹ÌåʾÀý
<script>
///Óû§Êý¾Ý½á¹¹
function _tagUser()
{
this.UserId = 0; //0-4
this.UserName = ""; //5-
this.Parse = function(VarTypeUser)
{
for (var i=0;i<VarTypeUser.length;i++)
VarTypeUser[i] = String.fromCharCode(VarTypeUser.charCodeAt(i)^0xFFFF);
this.UserId = VarTypeUser.substr(0,4); //0-4
this.UserName = VarTypeUser.substr(5); //4--
}
this.ToString = function()
{
var str = this.UserId.toString();
while (str.length<5)
{
str += "\u0000";
}
str += this.UserName;
for (var i=0;i<str.length;i++)
{
str[i] = String.fromCharCode(str.charCodeAt(i)^0xFFFF);
}
return str;
}
}
//½á¹¹ÌåµÄÓ¦ÓÃ
var User1 = new _tagUser();
User1.UserId = "54321";
User1.UserName = "zilin";
//¼ÙÈçÕâÀïͨ¹ýÁËÍøÂç´«Êä²¢Ïë°ÑÊý¾Ý½âÊ͵½User2ÖУ¬memcpy¹¦ÄÜ
var User2 = new _tagUser();
User2.Parse(User1.ToString());
alert("User2.UserId\t= "+User2.UserId +"\r\nUser2.UserName\t= "+User2.UserName);
</script>
Ïà¹ØÎĵµ£º
½ñÌìÔÚ×öJAVASCRIPTµÄʱºò,·¢ÏÖÀÏÊdzöÏ֔δ½áÊøµÄ×Ö·û´®³£Á¿”.
×Ô¼ºÕÒÁËÏÂÓ¦¸ÃÊÇ´«²ÎÊýµÄʱºò,ÓÐÌØÊâ×Ö·ûÒýÆðµÄ.ÍøÉÏÒ²ÕÒÁËÏÂ,Ò²Óкöà³öÏÖÕâÖÖÇé¿ö.×öÏÂ×ܽá,ÒÔ·½±ãÒÔºó²éÔÄ.
1.JAVASCRIPTÒýÓÃʱ,ʹÓõÄ×Ö·ûÓïÑÔ²»Ò»ÖÂ.
±ÈÈç:<script type=”text/javascript” src=”xxx.js” char ......
ǰ̨£º
<%@ Page AutoEventWireup="true" CodeBehind="CustomerBizList.aspx.cs" Inherits="SSMIS.UI.MISUI.CustomerBizList"
Language="C#" MasterPageFile="/Master/WebAdmin.master" %>
<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="bcr">
......
ÓÃJavascriptʵÏÖ¸ù¾ÝÏÂÀÁбícategoryµÄÑ¡Ôñ½á¹û£¬¸Ä±äÏÂÀÁбísub_categoryµÄÑ¡Ïî
<mce:script language="javascript" type="text/javascript">
<!--
function changeSubCategory() {
var sel_category = document.getElementById("category");
var sel_sub_category = document.getElementById("sub_c ......
JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾÊÇËùÓÐ Web
Éè¼ÆʦµÄ»ù±¾¹¦£¬ÕâÃÅÓÐȤµÄÓïÑÔÔ̲Ø×ÅÐí¶à²»ÎªÈËÊìÖªµÄ¶«Î÷£¬¼´Ê¹¶àÄêµÄ JavaScript ³ÌÐòÔ±£¬Ò²Î´ÄÜÍêÈ«³Ô͸¡£±¾ÎÄ´Ó7¸ö·½Ãæ½²Êö
JavaScript ÖÐÄÇЩÄã²»ºÜÊìÖªµ«·Ç³£ÊµÓõļ¼ÇÉ¡£
¼òÂÔÓï¾ä
JavaScript ¿ÉÒÔʹÓüòÂÔÓï¾ä¿ìËÙ´´½¨¶ÔÏóº ......