javascript»ñÈ¡ä¯ÀÀÆ÷µÄ¿í¶ÈºÍ¸ß¶È
<script language="JavaScript" type="text/JavaScript">
<!--
function displayScreenSize()
{
var bodyWidth =document.body.clientWidth; //ÍøÒ³¿É¼ûÇøÓò¿í
var bodyHeight =document.body.clientHeight; //ÍøÒ³¿É¼ûÇøÓò¸ß
var bodyWidthWithBorder =document.body.offsetWidth; //ÍøÒ³¿É¼ûÇøÓò¿í(°üÀ¨±ßÏߵĿí)
var bodyHeightWithBorder=document.body.offsetHeight; //ÍøÒ³¿É¼ûÇøÓò¸ß(°üÀ¨±ßÏߵĿí)
var bodyWidthWithScroll =document.body.scrollWidth; //ÍøÒ³ÕýÎÄÈ«ÎÄ¿í
var bodyHeightWithScroll=document.body.scrollHeight; //ÍøÒ³ÕýÎÄÈ«Îĸß
var bodyTopHeight =document.body.scrollTop; //ÍøÒ³±»¾íÈ¥µÄÉϱ߾à
var bodyLeftWidth =document.body.scrollLeft; //ÍøÒ³±»¾íÈ¥µÄ×ó±ß¾à
Ïà¹ØÎĵµ£º
ÏÂÃæÁ½¸ö·½·¨ÊµÏÖÁËÊý×éÖÐÈ¥µô Ç°Ãæ »òÕß ºóÃæµÄ ÖØ¸´Ïî
È¥µôÇ°ÃæµÄÖØ¸´Ïî·½·¨ °Ñarray [1, 2, 3, 1, 4, 5]È¥µôÇ°ÃæÖØ¸´Ïî µÃµ½ [2, 3, 1, 4, 5].
function unique(a)
{
var r = new Array();
o:for(var i = 0, n = a.length; i < n; i++) {
for(var x = i + 1 ; x < n; x++)
{
......
Javascript ÕýÔò±í´ïʽʹÓÃÊÖ²á
Javascript 2008-10-30 10:15 ÔĶÁ97 ÆÀÂÛ0
×ֺţº ´ó´ó ÖÐÖРСС
Ò»£®ÕýÔò±í´ïʽƥÅä³£ÓÃÓï·¨
“+”×Ö·û£º¹æ¶¨±í´ïʽ×Ö·û³öÏÖÒ»´Î»ò¶à´Î¡£
“*”×Ö·û£º¹æ¶¨±í´ïʽ×Ö·û³öÏÖÁã´Î»ò¶à´Î¡£
“? ......
1£ºÈ¡µÃ±íµ¥ÖеÄTextBox ÖеÄÊý¾Ý£ºdocument.FormName.TextBox.value;
2: ¿ØÖÆÔªËصÄÏÖʵºÍÒþ²Ø£ºÓÐvisibility ºÍ display
Çø±ð£º1£©Ç°ÕßµÄÊôÐÔÖµÓУ¬visible¡¢hidden ¡£
ºóÕßµÄÊôÐÔÖµÓУºblock ºÍ none£»
2£©Ç°ÕßËäÈ»Òþ ......
´ó¼Ò¿ÉÄܶ¼Óöµ½¹ýÔÚдjavascirpt´úÂëʱ´«µÝÖÐÎÄ£¬ÔÚºǫ́ȡµ½Ê±·¢ÏÖÊÇÂÒÂ룬ÕâÀï°ÑÎÒ½ñÌì×öµÄ·½·¨Ð´³öÀ´£¬Ï£Íû¶Ô´ó¼ÒÒÔºóÓÐÓã¡
·½·¨£¨Ò»£©£º
htmlÒ³Ãæ£º
function testOne() {
var url = "testOne_test.do?expr="+ÄãºÃ;
location = encodeURI(url);
}
ºǫ́java´úÂ룺
String expr = ne ......
ǰÌì×öµÄÒ³ÃæÊÇÒ»¸öiframeµ¯³ö´°¿Ú£¨ËµÃ÷һϣºÍ¬ÊÂÓÃjs½Å±¾¿ª·¢³öÀ´µÄ£©Àï´¥·¢Ò»¸ö<a>Á´½ÓµÄ°´Å¥¿ÉÔڸô°¿ÚÉϵ¯³öÒ»¸ödivÐü¸¡²ã¡£µ«ÊÇÿ´Îµã»÷£¬divÐü¸¡²ã¾Í×Ô¶¯Î»ÓÚIE´°¿ÚµÄ¶¥¶Ë£¬ÏÂÃæµÄiframe´°¿Ú°üº¬µÄÒ³Ãæ»á×Ô¶¯ÉÏÒÆ£¬Î»ÖôíÂÒÁË¡£
ͬÊÂ˵Ö÷ÒªÊ ......