BindVar

程序名称:BindVar

授权协议: 未知

操作系统: 未知

开发语言:

BindVar 介绍

Esta função é similar a sprintf, porém mais simples.

/* * s = "The %1 want %2"; * a,b... = args * BindVar(s,a,b) -> The a want b * ex.: BindVar("text message %3 %1 and %2", value1, value2, value3) -> text message value3 value1 and value2 * last-modified: 20080429 */ function BindVar() { var v=''; var args = BindVar.arguments; var numArgs = args.length; if(numArgs) { msg = args[0]; for(var i=1; i < numArgs; i++) { v = args[i] != undefined ? args[i] : ""; msg = msg.replace("%"+i, v); } } return msg; }

BindVar 官网

http://plugins.jquery.com/project/BindVar

相关编程语言

多功能下拉选择插件 SelectPage 简洁而强大的下拉分...
AutoComplete 是一个 jQuery Mobile 的插件,用于实...
Combogrid 是一个jQuery插件用于为输入框添加高级自...
Autobox2这个jQuery插件,可以用于创建类似于Facebo...
Link Scraper TextBox 是一个文本框的扩展插件,当你...
Awesomplete 超小超好用的超漂亮的 autocomplete 框...