javascript±Ê¼Ç
¶¨Òå±äÁ¿
var test=10;
ʹÓöÔÏóÊôÐÔ
¿ÉÒÔʹÓà . ²Ù×÷·û»ñµÃÊôÐÔ,Ò²¿ÉÒÔʹÓÃÊý×éϱê»ñµÃ,±ÈÈç
for(var prop in document)
document.write(document[prop]+"<br>");
With ÉùÃ÷¶ÔÏó,Ö®ºóÔÙÓõ½¶ÔÏó¾Í²»±ØÉùÃ÷ÁË
with(document){
write("Hello World<br>±êÌâ: ");
write(title);
}
³£ÓöÔÏó
×Ö·û´®¶ÔÏó
big ´ó×ÖÌåÏÔʾ
italics бÌåÏÔʾ
bold ´ÖÌåÏÔʾ
small С×ÖÌåÏÔʾ
blink ÉÁ˸ÏÔʾ
fixed ´ò×Ö»ú×ÖÌåÏÔʾ
fontsize(size) ¿ØÖÆ×ÖÌå´óС
ËãÊõº¯Êýmath¶ÔÏó
ʱ¼äÈÕÆÚ¶ÔÏó
function showTime()
{
var now=new Date();
with(document.clock.txt){
with(now){
value=(getYear()+"Äê"+(1+getMonth())+"ÔÂ"+getDate()+"ÈÕ");
value+=(" "+getHours()+":"+getMinutes()+":"+getSeconds());
}
}
setTimeout("showTime()",1000);
}
<head>
<script language="javascript" type="text/javascript" src="js.js"></script>
</head>
<body onload="showTime()">
<form name="clock" action="">
<input type="text" name="txt" value=""/></form>
</body>
</html>
Ïà¹ØÎĵµ£º
¸ù¾Ýä¯ÀÀÆ÷¸´ÖƵ½¼ôÌù°åµÄ¹¦ÄÜ£¬¾ßÌå´úÂëÈçÏ£º
var txt="Òª¸´ÖƵ½¼ôÌù°åµÄÄÚÈÝ";
function copyToClipboard(txt) {
if(window.clipboardData) {
window.clipboardData.clearData();
&nb ......
/// <summary>
/// ÅжÏÊÇ·ñΪÕýСÊý
/// </summary>
/// <param name="str"></param>
/// <returns>ΪÕýСÊýʱ·µ»Øtrue,ÆäËû·µ»Øfalse</returns>
public static bool IsDecimal(string str)
{
//ÉùÃ÷Regex¶ÔÏó±äÁ¿
Regex objAlp ......
ÎÒÃÇÖªµÀ£¬javascriptÔÚÖ´ÐÐÆÚʱÊÇÓÉÄÚµ½ÍâÖ´Ðнű¾µÄ£¬ÄÇôÀëÎÒÃǵĽű¾×îÔ¶µÄÈ«¾Ö¶ÔÏ󣬺ܿÉÄÜÒª¿çÔ½¼¸²ã×÷ÓÃÓò¶ÔÄÜ·ÃÎʵ½Ëü¡£²»¹ýÔÚIEÖУ¬´Ó×îÄڲ㵽×îÍâ²ãÒª»¨µÄʱ¼ä±ÈÆäËû¶à³öºÜ¶à¡£¼ÓÖ®£¬javascriptÊÇÒ»ÖÖ½ºË®ÓïÑÔ£¬Ëü±ØÐëÒªµ÷ÓÃDOM¶ÔÄÜÍê³ÉÎÒÃÇ´ó¶àÊýÑ¡Ôñ¡£×îÖøÃûµÄ¾ÍÊÇÑ¡ÔñÔªËØ£¨document.getElementById,documen ......
JavaScript½Ì³ÌÓïÑԸſö
Internetʱ´ú£¬Ôì¾ÍÁËÎÒÃÇÐµĹ¤×÷ºÍÉú»î·½Ê½£¬Æ以ÁªÐÔ¡¢¿ª·ÅÐԺ͹²ÏíÐÅÏ¢µÄģʽ£¬´òÆÆÁË´«Í³ÐÅÏ¢
´«²¥·½Ê½µÄÖØÖرÚÀÝ£¬ÎªÎÒÃÇ´øÀ´ÁËеĻúÓö¡£Ëæ׿ÆËã»úºÍÐÅϢʱ´úµÄµ½À´£¬ÈËÀàÉç»áÇ°½øµÄ½Å²½ÔÚÖ𽥼ӿ죬ÿһÌ춼ÓÐеÄÊÂÇé·¢Éú£¬Ã¿Ò»Ì춼ÔÚ´´Ôì×ÅÆæ
¼£¡£Ëæ×ÅInternet¼¼ÊõµÄÍ»·ÉÃͽø£¬¸÷Ðи÷ ......
ʹÓÃä¯ÀÀÆ÷µÄÄÚ²¿¶ÔÏóϵͳ,
¿ÉʵÏÖÓëHTMLÎĵµ½øÐн»»¥¡£ËüµÄ×÷ÓÃÊǽ«Ïà¹ØÔªËØ×éÖ¯°ü×°ÆðÀ´£¬Ìṩ¸ø³ÌÐòÉè¼ÆÈËԱʹÓ㬴Ӷø¼õÇá±à³ÌÈ˵ÄÀͶ¯£¬Ìá¸ßÉè¼ÆWebÒ³ÃæµÄÄÜÁ¦¡£
Ò»¡¢
ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷ÓÃ
¡¡¡¡³ýÁËÇ°ÃæÌáµ½¹ýµÄÎĵµdocument¶ÔÏóÍ⣬Navigatorä¯ÀÀÆ÷Öл¹ÌṩÁË´°¿Ú£¨Window£©¶ÔÏóÒÔ¼°ÀúÊ·£¨History£©ºÍÎ»Ö ......