C# Active¿Ø¼þ£¬²¢´¥·¢javascriptʼþ
´´½¨Ò»¸öWinformÓû§¿Ø¼þ UserControl1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Reflection;
namespace MyActiveTest
{
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.AutoDual)]
[ComSourceInterfaces(typeof(UserControl1Events))]
[Guid("B0CF6712-4798-424d-8D08-A1E1E2F53B74")]
public partial class UserControl1 : UserControl, IObjectSafety
{
public delegate void SubmitClickedHandler();
public event SubmitClickedHandler SubmitClicked;
public UserControl1()
{
InitializeComponent();
}
//
private string _mymessage;
public string Mymessage
{
get { return _mymessage; }
set { _mymessage = value; }
}
string _param = "http://www.163.com";
public string Param
{
get
{
return _param;
}
set
{
_param = value;
}
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(_mymessage);
if (SubmitClicked != null)
// _param = "ÕâÊÇÒ»¸ö²âÊÔµÄÎļþ";
SubmitClicked();
}
public void ttMessageBox()
{
MessageBox.Show("sdsdfsd");
}
#region IObjectSafety ³ÉÔ±
public void GetInterfacceSafyOptions(int riid, out int pdwSupportedOptions, out int pdwEnabledOptions)
{
pdwSupportedOptions = 1;
pdwEnabledOptions = 2;
}
public void SetInterfaceSafetyOptions(int riid, int dwOptionsSetMask, int dwEnabledOptions)
{
//throw new Exception("The method or operation is not imple
Ïà¹ØÎĵµ£º
¶¨Òå·½·¨£º
1¡¢Óù¹Ô캯ÊýRegExp
2¡¢Ö±½ÓÁ¿£¬°üº¬ÔÚÒ»¶Ô£¨/£©Ö®¼äµÄ×Ö·û
Ö±½ÓÁ¿×Ö·û£º
×ÖĸÊý×Ö×Ö·û——×ÔÉí
\o——NULL×Ö·û
\t——ÖÆ±í·û
\n——»»Ðзû
\v——´¹Ö±ÖƱí·û
\f——»»Ò³·û
\r——»Ø³µ·û ......
*------------------------------------------------------
*˵Ã÷£ºselectÔªËØjavascript³£ÓòÙ×÷
* 1.ÅжÏÊÇ·ñ´æÔÚÖ¸¶¨valueµÄItem
* 2.¼ÓÈëÒ»¸öItem
* 3.ɾ³ýֵΪvalueµÄËùÓÐItem
* 4.ɾ³ýijһ¸öindexµÄÑ¡Ïî
  ......
JavascriptÓïÑÔµÄÃæÏò¶ÔÏóÌØÕ÷ºÜÈõ£¬ÆäËûÃæÏò¶ÔÏóÓïÑÔÔÚ´´½¨ÀàʱֻҪʹÓùؼü×Östatic¼´¿ÉÖ¸¶¨ÀàΪ¾²Ì¬À࣬JavascriptûÓÐÌṩstaticÕâÑùµÄ¹Ø¼ü×Ö£¬ÒªÈÃJavascriptÒ²¾ßÓГ¾²Ì¬”ÌØÐÔÖ»Óп¿Ò»Ð©“Ææ¼¼ÒùÇÉ”ÁË¡£
´úÂëÖÐÁоÙÁËÁ½ÖÖ¾²Ì¬·½·¨/ÊôÐÔµÄʵÏÖ·½Ê½£¬Ò»ÖÖÊǾ²Ì¬ÀàµÄ¾²Ì¬·½·¨ºÍÊôÐÔ£¬ÁíÒ»ÖÖÊǷǾ ......
40¸öÇáÁ¿¼¶JavaScript¿â½éÉÜ
Á÷ÐÐ JavaScript ¿â²»Ê¤Ã¶¾ÙjQuery, MooTools, Prototype, Dojo, YUIÕâЩ JavaScript ¿â¹¦Äܷḻ¼ÓÉÏËüÃDzå¼þ¼¸ºõÄÜʤÈÎÈκι¤×÷È»¶øÕâÓдú¼ÛÕâЩ¿âÍùÍùµ¼ÖÂÄãÍøÒ³³ß´çÓ·Ö×ijЩ³¡ºÏÈç¹ûÄãÖ»ÏëÍê³ÉÌØ¶¨¹¤×÷¿ÉʹÓÃһЩ¹¦ÄܸüרһÇáÁ¿¿â±¾ÎĽéÉÜÁË40¸ö·Ç³£³öÉ«ÇáÁ¿¼¶ JavaScript ¿â
......
1. document.write( " "); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document- >html- >(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window- >(navigator,screen,history,location,document)
5.µÃµ½±íµ¥ÖÐÔªËØµÄÃû³ÆºÍÖµ:document.getElementB ......