我正在使用自动填充插件https://addons.mozilla.org/pl/firefox/addon/autofill-262804/
,我想用定义的随机文本填充我的文本字段。
例如,我想用以下定义之一填充 /* City */city|town
字段:伦敦、巴黎、阿姆斯特丹
但我不知道该怎么做。
开发者说:
Variables – use special variables to output random words (text spinner), numbers, and alphanumeric characters
所以这是可能的。
请帮助我。
编辑
或者也许您知道任何插件/方法可以使用定义的随机文本自动填充字段
最佳答案
尽管对你的问题悬赏,我还是设法找到了解决方案 - 我也很难在 Google 网上论坛页面和开发者网站中找到它,直到我找到了他的 "other" page ,其中指出:
展开变量 – 如果选中此框,则 {...} 将替换为变量的输出。目前您可以使用三种类型的变量:
{word1|word2|...} – This variable acts like a text spinner, randomly outputting one word from a list of words that you specify. Example: to output "house", "condo", "apartment", or "flat", you would enter {house|condo|apartment|flat}
{#} or {#number} – This variable outputs a random number. You can specify the number of digits after # ({#1} is equivalent to {#}). Example: to generate a random telephone number, you would enter ({#3}) {#3}-{#4}
{$} or {$number} – This variable outputs a random alphanumeric string. You can specify the number of characters after $ ({$1} is equivalent to {$}). Example: to generate a 16-character dummy text string, you would enter {$16}
例如,在元素的自动填充值框中,输入:
{$6}@{$6}.com
将插入由 6 个随机字母组成的电子邮件地址,后跟 @,然后是 6 个随机字母,最后是 .com。
关于自动填充定义的随机文本 - Firefox Addon,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13870213/