javascriptÖе÷ÓÃdelphiº¯Êý
ÒÔÏÂÊÇtest.htmÒ³µÄÄÚÈÝ
Ê×Ïȶ¨ÒåÒ»¸ö²å¼þ¶ÔÏó
<object id="Mapupload" name="Mapupload" width="0" height="0" classid="clsid:045FA9B9-B373-4D4C-AE76-128A19A4B6AE">
</object>
<script type="text/javascript">
//´Ëº¯Êý´ò¿ªactivexform´°Ì岢ΪactiveformµÄÊôÐÔ¸³Öµ
function loadUploader(){
if(window.ActiveXObject){
try{
document.getElementById("Mapupload").picname='20060531'; //Ϊ¶ÔÏó¸³Öµ
document.getElementById("Mapupload").open(); //µ÷ÓöÔÏóµÄopen·½·¨
}
catch(e){
}
}
else{
}
}
</script>
<TEXTAREA style="WIDTH: 400px; HEIGHT: 226px" name="" id='Content' rows=20 cols=40></TEXTAREA>
<button name="start" type="button" onclick="loadUploader();"></button>
<!-- scriptº¯Êý -->
<script Language=Javascript>
function InsertHTML()
{
var UrlStr = document.getElementById("MapUpload").Content;
alert(UrlStr);
}
</script>
<!-- ¶¨ÒåDelphiÖзÃÎʵÄOnCallʼþ¶ÔÓ¦µÄScript·½·¨ -->
¶¨Òå¶ÔÏóµÄOnInsertHTMLʼþΪactiveformµÄOninsertHTMLʼþ£¬²¢´¥·¢Ò³ÃæµÄinserthtml·½·¨
<SCRIPT FOR="Mapupload"
EVENT="OnInsertHTML()"
LANGUAGE="JScript">
<!-- insert script commands -->
InsertHTML();
</SCRIPT>
delphiÖнöÐèÔÚ_TLBÖÐÉùÃ÷OninsertHTMLʼþ£¬Open·½·¨£¬contentÊôÐÔ¼´¿É
procedure TFeSendFrmX.open;
begin
hnd := self.handle;
FrmUpLoad := TFrmUpLoad.Create(self);
with FrmUpload do
begin
ShowModal;
 
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
Ò³ÃæÌá½»Êý¾ÝÒ»°ãÓÐÁ½ÖÖ·½·¨£ºget,post¡£post¾ÍÊÇËùνµÄformÌá½»£¬Ê¹ÓÃÊÓͼ£»getÊÇͨ¹ýurlÌá½»¡£
Get·½·¨Ò»°ãÓúǫ́´úÂ루Èçasp,asp.net£©»ñµÃ²ÎÊý£¬´úÂëºÜ¼òµ¥£ºRequest.QueryString["id"];¼´¿É»ñÈ¡¡£
ÓÐЩʱºòÐèÒªÖ±½ÓÔÚǰ̨»ñÈ¡url²ÎÊý£¬ÒªÓõ½javascript£¬jsûÓÐÖ±½Ó»ñÈ¡url²ÎÊýµÄ·½·¨£¬ÄÇô£¬ÎÒÃÇÈçºÎͨ¹ýjs ......
<title>JavaScriptÇл»Í¼Æ¬</title>
<script>
function showDaTu(src){
document.getElementById("defaultImg").src=src;
}
</script>
<img src="/jscss/demoimg/wall1.jpg" id="defaultImg">
<br><br><br>
<img src='/jscss/demoimg/wall_s1.jpg' onmouseover ......
Chrome ÓµÓиü¿ìËÙµÄJavaScript£»
±àдÈçÏÂС³ÌÐò£º
<html>
<script language = "javascript">
var sum = 0;
var start = new Date;
for(var i = 0; i < 1000001; i++){
sum+=i;
}
var stop = new Date;
document.write("´Ó1µ½1000000µÄÀÛ¼Ó½á¹û£º" + sum + ";" + "<br/> ......
´ó¼ÒÔÚÈí¼þ¿ª·¢Ê±¾³£»áÓöµ½ÕâÑùµÄÇé¿ö£¬ÔÚ²»Í¬µÄ¿ª·¢»·¾³ÖÐΪʵÏÖһЩ¹¦ÄÜÏàͬµÄ¹ý³Ì£¬ÓÉÓÚ¿ª·¢ËùʹÓõÄÉè¼ÆÓïÑÔ²»Í¬£¬Òò¶ø²»µÃ²»±àдÐí¶àÀàËƵĴúÂ룬ÉõÖÁÓÐʱҪÔÚͬһ¸ö¿ª·¢»·¾³²»Í¬ÏîÄ¿ÖÐÖØд´úÂ룬Õâ¾ÍÔì³ÉÁ˺ܴóµÄ×ÊÔ´ÀË·Ñ¡£¶¯Ì¬Á´½Ó¿âÄܽϺõĽâ¾öÕâ¸öÎÊÌ⣬Öظ´ÀûÓôúÂ뽫´ó´óÌá¸ßÁË¿ª·¢Ð§ÂÊ¡£Ò»°ã£¬Óû§ÔÚÓ¦ÓóÌÐò ......