javascript ×Ö·û ±È½ÏÎÊÌâ
var a="some";
var b="some";
ÔõôÅÐ¶Ï a ºÍ b ÊDz»ÊÇÏàµÈѽ£¬
(ÓÃ==ºÃÏñ²»ÐÐ)
if (a!=b)
alert("×Ö·û²»·û")
else
alert("×Ö·ûÏàͬ")
if(a==b)¿ÉÒÔÓÃ"=="ºÅÅÐ¶ÏµÄ .
ÎÒÕâÓÃ==²»ÐУ¬ÊÇʲôÔÒòѽ£¬
JScript code:
function test(){
a = "some";
b = "some";
if(a==b){
alert("ÏàµÈ");
}
}
HTML code:
<input type="button" value="²âÊÔ" onclick="test()" />
JScript code:
<script>
var a="some";
var b="some";
if (a==b)
alert("×Ö·ûÏàͬ");
else
alert("×Ö·û²»·û");
</script>
ÎÒÊÔ¹ý£¬¿ÉÒÔ
Äã°Ñ½Å±¾µ÷ÊÔ¿ª¿ª£¬¿´¿´ÊÇʲôÔÒò
JScript code:
function test(){
if($("#text").val()=="some"){//Èç¹ûÊÇÎı¾¿òÅжÏ×Ö·ûÒª¼Ó""
alert("ÏàµÈ");
}else alert("²»ÏàµÈ
Ïà¹ØÎÊ´ð£º
ÎÒÔÚ¹¤×÷ÖÐÓöµ½ÁËһЩÎÊÌ⣬¾ÍÊÇÔÚhtmlÎļþµ÷ÓÃjavascriptºÃÓ㬿ÉÊÇÓÃ.net µ÷ÓÃJS¾Í²»ºÃÓã¬ÕÒÁ˺ܶà×ÊÁÏ£¬µ«ÊÇ»¹²»ºÃÓá£ÏÖÔÚÇó´ó¼ÒÓÐûÓÐʲôºÃµÄÎÄÕ»òºÃµÄÊé½éÉÜһϣ¬ÈÃÎҺúÃѧϰһÏÂ.net¶ÔJSµÄ²Ù×÷¡£Ð»Ð»´ó¼ ......
ÎÊÌâÃèÊöÈçÏ£º
ÓÃC#¿ª·¢µÄActiveXǶÈëÍøÒ³ÖУ¬¸ÃActiveXÖÐÓÐÒ»¸ö°´Å¥button1.ÏÖÔÚҪʹµÃÓû§µ¥»÷ÁËbutton1ºóʵÏÖÒ³ÃæÌø×ªµÄ¹¦ÄÜ£¬¼´Óɵ±Ç°µÄ1.htmÌø×ªµ½2.htm¡£
Î ......
JScript code:
<form id="myform" name="myform">
<input type='hidden' name='maxp' value='6'></input>
<input type='text' id='pageinput' onkeydown="if(e ......
<script language="javascript">
function printdate(){
var now=new Date();
var year=now.getYear();
var month=now.getMonth();
&n ......
Ôõô½«ÕâÖÖÀàÐÍ
Mon Sep 15 00:00:00 CEST 2008
µÄÈÕÆÚת»¯Îª
2008-10-15
ûÈË»áÂð£¿
JScript code:
function formatDate(D)
{//µ÷Õûʱ¼äÏÔʾ¸ñʽ2007-01-01 12:00:00
return D.g ......