javascript , ajax
ÎÊ:
Hi,
I have this C#/ASP.NET/.aspx page with a string variable named myString with the value "Mario Gamito".
How can I access "Mario Gamito" from within a JavaScript function, i. e., the variable's value ?
Already tried '" + mystring + "' but it doesn't works.
Any help would be appreciated.
´ð1£º
<!-- Default2.aspx -->
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
function show()
{
var value=document.getElementById("Hidden1").value;
window.alert(value);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Hidden1" type="hidden" runat="server"/>
<input id="Button1" type="button" value="button" onclick="show();"/>
</div>
</form>
</body>
</html>
using System;
using System.Collections;
//Default2.aspx.cs
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web
Ïà¹ØÎĵµ£º
javascriptÉè¼ÆÄ£Ê½µÚÒ»ÕÅÓÐÒ»¸öÓÐȤµÄʵÏּ̳еķ½·¨£¬µ±È»javascript±¾ÖÊÉÏÊÇʵÏּ̳У¬»¹²»ÊǵäÐÍÒâÒåÉϵÄ"is-a"µÄÂß¼¼Ì³Ð»òÕß˵ÊÇÓïÒå¼Ì³Ð¡£»ù±¾µÄ·½·¨¾ÍÊÇͨ¹ýfunctionµÄprototypeÊôÐÔ¡£
Ò»£¬ºÜ¼òµ¥µÄ·½·¨
<script type="text/javascript">
<!--
var Anim = function(){ ......
£¨1£©ÏÂÔØClientInfo.dll£¨ÔÚÎÒµÄ×ÊÔ´ÖпÉÒÔÏÂÔØhttp://download.csdn.net/source/2141582£©
£¨2£©Ê¹ÓÃnew ActiveXObject("ClientInfo.HostInfo")µ÷ÓÃActiveX¿â
£¨3£©GetAdapterMac(0)»ñÈ¡Íø¿¨MACµØÖ·
ʹÓÃʾÀý£º
<HTML>
<TITLE>ClientInfoX JavaScript Sample</TITLE>
<HEAD>
<script l ......
³ö´¦£ºhttp://www.jcwcn.com/article/2005/1210/javascript_17476.html
<HTML>
<HEAD>
<title>WEBÒ³Ãæµ¼³öΪEXCELÎĵµµÄ·½·¨
</title>
</HEAD>
<body>
<BR>
<table id = "PrintA" width="100%" border="1" cell ......
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml ......
O3D ÊÇÒ»¸ö¿ªÔ´µÄWeb API£¬Æä¿ÉÒÔ´´½¨Ï൱ţXµÄ»ùÓÚä¯ÀÀÆ÷µÄ¿É½»»¥Ê½µÄ3DÓ¦Óá£Õâ¸öAPIÔÚºÜÓпÉÄÜ»áÐγÉÒÔºóµÄWebÉϵÄ3DͼÐεıê×¼¡£ÏÂÃæÊÇÕâ¸öAPIµÄÖ÷Õ¾µã£º http://code.google.com/apis/o3d/ ¡£O3DĿǰ֧³ÖWindows, MacºÍLinuxÈýÖÖÆ½Ì¨¡£
ÏÂÃæÊÇһЩ¼òµ¥µØÊ¹ÓÃO3DµÄAPIµÄÈçºÎ´´½¨Ò»¸öÁ¢·½Ì壬¸üÏêϸµÄÄÚÈÝÇ ......