随笔分类 - [05] JavaScript/Ajax
用于设计网页/网站。AJAX提高用户体验。
摘要: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0045)http://www.dedestruct.com/cursorPosition.html --> <HTML xmlns="http://www...
阅读全文
摘要:Hi all,This is the code that's not working in Safari 4: <%@ Page Language="C#" AutoEventWireup="true" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %><!DOCTYPE html PUBLIC "
阅读全文
摘要:How to : Use a Key Value Pair in your AutoCompleteExtender ( updated again... ) Hi all,This has come up time and again on the asp.net Ajax forums and has become the Top Voted issue for the AutoCompleteExtender Work Items . I had some time the other day and set upon to write a fix for this .How do yo
阅读全文
摘要:aspx page<script language="javascript" type="text/javascript"> function clicking(Obj) { var a=document.getElementById("ctl00_ContentPlaceHolder1_ctl20_AAA1_rbtnStudent"); var b=document.getElem...
阅读全文
摘要:一般来说,就是使用遍历的方法,判断每个Radio是否被选中,如果是,再取其值. 1:找出网页中所有控件的name为"rdPort" 的控件,再遍历判断 var ip=""; var rPort = document.all.rdPort; for(i=0;i<rPort.length;i++) {
阅读全文
摘要:Rad TreeView for ASP.NET AJAXhttp://www.telerik.com/products/aspnet-ajax/treeview.aspxAjaxPro.NET框架生成高效率的Tree(Asp.net 2.0)(示例代码下载)http://www.builder.com.cn/2008/0324/781170.shtmlASP.NET TreeView Control - AJAX Tree-Grid Hybrid Control - DevExpress ASPxTreeListhttp://www.devexpress.com/Products/NET/C
阅读全文
摘要:众所周知,Firefox有一个Error Console可以很方便的调试Javascript的错误,特别加上一些强大的扩展,比如Firebug,在Firefox下面写Javascript简直就是一种享受,最近写一个Mini Editor的时候,在Safari下面一直不太正常,Safari其实也有DEBUG功能的,只是默认没有开启而已,好了,我们的目标就是开启Safari 的DEBUG功能,一共有两...
阅读全文
摘要:显示动态时间 10:14:36 Today it is Sunday 将当前日期转换成字符串 Sun, 9 Aug 2009 02:11:38 UTC <html> <head> <script type="text/javascript"> function startTime() { var today=new Date() var ...
阅读全文
摘要:拖动一个ScriptMange,就出现了“Microsoft JScript runtime error: 'Sys' is undefined”的错误,Google了一把,发现原来有朋友也遇到了类似的错误,把方法贴一下, ajax.net1.0正式版 在 web.config-->system.web配置节添加 <httpHandlers> <remove verb="*" path="*.asmx"/> <add verb="*" path="*.asmx"
阅读全文
摘要:UpdateProgress always seems to render the contents of <ProgressTemplate> on a new line (block). Any simple way to have that render inline where it is placed?============Best soultion I could come up with was to use the following code:<p><span class="progress"> <atlas:U
阅读全文
摘要:下面的 JavaScript 函数为开发人员提供了他们所需要的所有功能: • concat() – 将两个或多个字符的文本组合起来,返回一个新的字符串。 • indexOf() – 返回字符串中一个子串第一处出现的索引。如果没有匹配项,返回 -1 。 • charAt() – 返回指定位置的字符。
阅读全文
摘要:为 ajaxToolkit:AutoCompleteExtender 传递3个参数: string prefixText, int count, string contextKey 。IntroductionThis article explains the concept of the Ajax AutoComplete Textbox to fetch data from the database with additional parameter.A Textbox can be integrated with the Ajax AutoComplete Extender to perf
阅读全文
摘要:What I wanted to do is using the autocomplete, search a receiver table, once a user selected a particular item in the autocomplete, the ReceiverID of the particular item is then somehow passed through to the code behind, and this ReceiverID is then used to display the receiver details in a panel bel
阅读全文
摘要:======================== Format phone number: (123)456-7890 ======================== <script language="javascript"> var zChar = new Array(' ', '(', ')', '-', '.'); var maxphonelength...
阅读全文
摘要:function confirmCallBackFn1(arg) { var result=arg; if(result==true) ...
阅读全文
摘要: Phone number (123)456-7890 <%@ Page Language="VB" AutoEventWireup="false" CodeFile="TEST.aspx.vb" Inherits="TEST" %> <!DOCTYPE html PUBLIC &qu...
阅读全文
摘要:.NET在后置代码中输入JS提示语句(背景不会变白) Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", ""); 引:http://niunan.javaeye.com/blog/248256
阅读全文
摘要:注意:Option中的O是要大写的,不然语法报错 1.动态创建select function createSelect(){ var mySelect = document.createElement("select"); mySelect.id = "mySelect"; document.body.appendChild(mySelec...
阅读全文
摘要:The alert, confirm, and prompt boxes The three "commands" involved in creating alert, confirm, and prompt boxes are: window.alert() window.confirm() window.prompt() Lets look at them in detail. Th...
阅读全文
摘要:将String类型解析为Date类型. parseDate('2006-1-1') return new Date(2006,0,1) parseDate(' 2006-1-1 ') return new Date(2006,0,1) parseDate('2006-1-1 15:14:16') return new Date(2006,0,1,15,14,16) pa...
阅读全文