随笔分类 -  Javascript

摘要:在使用jqplot生成柱状图的时候我们经常需要自定义柱状图的颜色,网上给的方法是添加以下代码:seriesColors: ["#F39801", "#29A7E1", "#8FC320", "#E71873"],如果是有多个series,这样设置就可以了。但是如果只有一个series就不行了,还需要设置以下属性:varyBarColor: true,最后生成的图表如下所示: 阅读全文
posted @ 2014-03-31 15:04 johLife 阅读(647) 评论(0) 推荐(0)
摘要:GetUrlKeyValue 阅读全文
posted @ 2013-06-17 10:09 johLife 阅读(574) 评论(0) 推荐(0)
摘要:原文地址:http://geekswithblogs.net/SoYouKnow/archive/2011/08/20/a-dummies-guide-to-sharepoint-and-jqueryndashgetting-amp-setting-sharepoint.aspx<< SharePoint Saturday: The Conference–Slides and Wrap Up | Home | Don’t be “That Company”… Allow your employees to work from home… >>A Dummies Guid 阅读全文
posted @ 2012-08-27 11:01 johLife 阅读(326) 评论(0) 推荐(0)
摘要:使用jquery.SPServices查询文档库里的某一个文档,需要设置CAMLQueryOptions属性,<ViewAttributes Scope="RecursiveAll" />才能查询出来,取值的时候需要使用SPFilterNode("z:row") $().SPServices({ operation: "GetListItems", async: false, listName: "Test Documents", CAMLQuery: "<Query><Wh 阅读全文
posted @ 2012-05-23 15:34 johLife 阅读(891) 评论(4) 推荐(0)
摘要:原文地址:http://sharepoint-works.blogspot.com/2012/02/cascading-dropdown-or-filtered-values.htmlSharepoint 下拉菜单联动Cascading dropdown (or) Filtered Values in Lookup Columns in SharePointTo know about the basics of Lookup Columns read this article.Also, to know about the Enhancements of Lookup columns in S 阅读全文
posted @ 2012-04-24 14:09 johLife 阅读(521) 评论(0) 推荐(0)
摘要:jquery jqplot pierenderer 饼图百分比小于3的无法显示DataLabels,需要设置如下属性:this.dataLabelThreshold = 3将3改为0即可。设置DataLabels的位置:this.dataLabelPositionFactor = 0.520到1之间,值越大,离饼图边缘越近。 阅读全文
posted @ 2012-04-06 11:23 johLife 阅读(376) 评论(0) 推荐(0)
摘要:The init.js and core.js JavaScript filesin the layouts directory of SharePoint2007 contain alot of helpful JavaScript functions. Here is a brief list ofsome of the most helpful classes, functions and variablesavailable.If you are looking for SharePoint 2010, check out the extensive ECMAScript Class 阅读全文
posted @ 2011-07-04 16:37 johLife 阅读(844) 评论(0) 推荐(0)
摘要:URL编码转换,escape() encodeURI() encodeURIComponent()escape() 方法:采用ISOLatin字符集对指定的字符串进行编码。所有的空格符、标点符号、特殊字符以及其他非ASCII字符都将被转化成%xx格式的字符编码(xx等于该字符在字符集表里面的编码的16进制数字)。比如,空格符对应的编码是%20。unescape方法与此相反。不会被此方法编码的字符:@ * / +英文解释:MSDN JScript Reference: Theescape method returns a string value (in Unicode format) that 阅读全文
posted @ 2011-06-15 10:00 johLife 阅读(1068) 评论(0) 推荐(0)
摘要:When encoding a URL, a character may not be available on the keyboard. Other times, the character of a URL might not be usable in contexts where it may conflict with a reserved character. In either case, the character can be encoded with a % followed by its ASCII hexadecimal equivalent code. Charact 阅读全文
posted @ 2011-04-23 11:00 johLife 阅读(313) 评论(0) 推荐(0)
摘要:以下是xslt数值的函数与xslt字符串函数的说明与参考示例。1、xslt数值的函数:(1)fn:number(arg) 返回参数的数值。参数可以是布尔值、字符串或节点集。 示例:<xsl:value-of select="number('100')"/> 返回 100(2)fn:abs(num) 返回参数的绝对值。 示例:<xsl:value-of select="number(-3.14)"/> 返回 3.14(3)fn:ceiling(num) 返回大于 num 参数的最小整数。(注:这里有些文章是写错了的, 阅读全文
posted @ 2011-04-13 12:52 johLife 阅读(879) 评论(0) 推荐(0)
摘要:第一种:JS定时自动关闭窗口 <script language="javascript"><!--function closewin(){self.opener=null;self.close();}function clock(){i=i-1document.title="本窗口将在"+i+"秒后自动关闭!";if(i>0)setTimeout("clock();",1000);else closewin();}var i=10clock();//--></script> 阅读全文
posted @ 2011-04-06 14:44 johLife 阅读(1356) 评论(0) 推荐(0)