BindVar

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-13 16:41:30

软件介绍

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;
}

本文地址:https://www.codercto.com/soft/d/23303.html

Web软件用户界面设计指南

Web软件用户界面设计指南

林锐、唐勇、石志强 / 电子工业出版社 / 2005-5-1 / 20.00元

Web软件用户界面设计指南,ISBN:9787121010163,作者:林锐等编著一起来看看 《Web软件用户界面设计指南》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具