¼±£¬ÈçºÎ»ñÈ¡HtmlElement.InvokeMemberÖ®ºóµÄHTMLÊý¾Ý
Ò»¸öÍøÒ³³ÌÐò£¨½çÃæÉÏÓÐ1¸öTextBoxºÍ1¸öButton£©
Ö÷Ìå´úÂ룺
C# code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.TextBox1.Text="Hello,World";
Button1.Click += new EventHandler(Button1_Click);
}
void Button1_Click(object sender, EventArgs e)
{
//throw new NotImplementedException();
this.TextBox1.Text = "Hello World,Change!";
}
}
ÏÖÔÚÎÒÒªÔÚÒ»¸ö¿ØÖÆÌ¨³ÌÐòÀïÃæµ÷ÓôËWeb³ÌÐòÖÐButton¿Ø¼þµÄClick·½·¨
C# code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Net;
using System.IO;
using System.Security.Permissions;
namespace Ä£Äâµã»÷²Ù×÷_Console
{
class Program
{
WebBrowser wb;
//·µ»ØÍøÒ³ÄÚÈÝ×Ö·û´®
StringBuilder allInfo = new StringBuilder();
//Html Îĵµ¶ÔÏó
HtmlDocument doc;
/// <summary>
/// ½ØÈ¡Ä³ÍøÒ³ÖеÄËùÓÐÊý¾Ý--²âÊÔº¯Ê
Ïà¹ØÎÊ´ð£º
select ÏÂÑù±í£¬ <select name="us">
<option value="aa" selected>aa </option>
& ......
±ÈÈçÎÒÏë×öÒ»¸öÕâÑùµÄÍøÕ¾£º
»ñÈ¡ÍⲿhtmlµÄ´úÂ룬ÀýÈç http://www.cnblogs.com/ioriliao/ µÄhtml´úÂëÈ»ºóÓÃdom½øÐÐ
½âÊÍ¡£
ÏÖÔÚÓöµ½µÄÎÊÌâ¾ÍÊÇÈçºÎÈ¥»ñÈ¡ÍⲿµÄhtml´úÂë¡£
Çë¸ßÈËÖ¸µã¡£Ð»Ð»£¡
ie --¡·±£´æ
......
JSµÄÎÊÌ⣺
JScript code:
<script language="javascript">
function getDates()
{
document.getElementById("form1").tt_cc.value="ÎÒ°®JS";
......
<style>
BODY A:hover {
CURSOR: url('http://files.poqbum.com/Files/Cursors/page1/iloveu2.ani')
}
A:link {
FONT-SIZE: 12px; COLOR: #666666; TEXT-DECORATION: none
}
A:visited {
FONT-SIZE ......