摘要:#include<stdio.h>#define min -99999999int sta,end;int main(){ int n,i,j,t,sum,maxsum,in,b; scanf("%d",&n); for(i=0;i<n;i++) { sum=0;maxsum=min;sta=0; scanf("%d",&t); for(b=j=0;j<t;j++) { scanf("%d",&in); sum+=in; if(sum>ma... 阅读全文
php开发简单网站模板
2012-08-16 12:00 by youxin, 650 阅读, 0 推荐, 收藏,
摘要:View Code <?php # Script 2.1 - config.inc.php/* * File name: config.inc.php * Created by: Larry E. Ullman of DMC Insights, Inc. * Contact: LarryUllman@DMCInsights.com, http://www.dmcinsights.com * Last modified: November 8, 2006 * * Configuration file does the following things: ... 阅读全文
Dom children 属性及childNodes
2012-08-14 18:29 by youxin, 528 阅读, 0 推荐, 收藏,
摘要:Element.childrenchildrenreturns acollectionof child elements of the given element.Thechildrenattribute is read-only.// parg is an object reference to a <p> elementif (parg.childElementCount)// So, first we check if the object is not empty, if the object has child nodes { var children = parg.ch 阅读全文
Js 下拉框新建窗口
2012-08-10 01:08 by youxin, 331 阅读, 0 推荐, 收藏,
摘要:<body><form id="aform"><select id="mymenu" size="1"><option value="nothing" selected="selected">Select a site</option><option value="http://www.dynamicdrive.com">Dynamic Drive</option><option val 阅读全文
iframe 使用
2012-08-09 19:50 by youxin, 436 阅读, 0 推荐, 收藏,
摘要:<iframe src="http://www.youdao.com" width="500" height="600" ></iframe>属性:frameborder 1 0指定是否有无边框scrolling: auto|yes|no specifies whether or not to display scrollbars in an <iframe>.Use iframe as a Target for a LinkAn iframe can be used as the target f 阅读全文
Js Window Object
2012-08-09 19:39 by youxin, 256 阅读, 0 推荐, 收藏,
摘要:The window object represents an open window in a browser.If a document contain frames (<frame> or <iframe> tags), the browser creates one window object for the HTML document, and one additional window object for each frame.alert("An error occurred!")However, the window object i 阅读全文
Js 作用域
2012-08-09 19:15 by youxin, 257 阅读, 0 推荐, 收藏,
摘要:Scope is a tricky feature of JavaScript.(棘手的问题) All object-oriented programming languages have someform of scope; it just depends on what context a scope is kept within. In JavaScript, scope iskept within functions, but not within blocks (such as while, if, and for statements). The endresult could b 阅读全文
javascript 冒号使用说明
2012-08-09 18:05 by youxin, 1703 阅读, 0 推荐, 收藏,
摘要:JavaScript中冒号(:)是做什么的?你可能经常看到这的写法:<div onclick="javascript:alert('test')">test</div>你可能很习惯认为这是一个伪协议,意思是使用JavaScript语法解析后面的代码,在a标签的href中才是伪协议!那么如果这个代码变成这样呢:<div onclick="xxoo:alert('test')">test</div>你可以试试,代码并不会出错,因为在JavaScript中这样的写法是合法的。其语法 阅读全文
JavaScript 函数重载和类型检查
2012-08-09 17:54 by youxin, 296 阅读, 0 推荐, 收藏,
摘要:var variable_name;You can’t use a hyphen, though; it is interpreted as a minus sign. js中变量不能用连字符, 其他面向对象语言如java的一个常见特性是,能够根据传入的不同数量或类型的参数,通过“重载”overload函数来发挥不同的功用。尽管这个特性在js中没有被直接支持,也有很多办法能够实现。 函数重载必须依赖2件事情:判断传入参数数量的能力和判断传入参数类型的能力。我们先来看看参数的数量。 js的每个函数都带有一个包含所有传给函数的参数的伪数组(pseudo array)所有他并非真正意义的数组(也.. 阅读全文
window.onload使用
2012-08-09 16:49 by youxin, 236 阅读, 0 推荐, 收藏,
摘要:<html><head> <title>Introduction to the DOM</title> <script> // We can't manipulate the DOM until the document // is fully loaded window.onload = function(){ // Find all the <li> elements in the document var li = document.getElementsByTagName('li'); // 阅读全文
浙公网安备 33010602011771号