💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# B.25 InputTask The `InputTask` can be used to interactively set property values based on input from the console (or other Reader). Table B.25:聽Attributes NameTypeDescriptionDefaultRequired`propertyName``String`The name of the property to set.n/aNo`defaultValue``String`The default value to be set if no new value is provided.n/aYes`message``String`Prompt text (same as CDATA).n/aYes`promptChar``String`The prompt character to follow prompt text.n/aNo`validArgs``String`Comma-separated list of valid choices the user must supply. If used, one of these options must be chosen.n/aNo`hidden``Boolean`Whether to hide user input.n/aNo B.25.1 Examples ``` <!-- Getting string input --> <echo>HTML pages installing to: ${documentRoot}</echo> <echo>PHP classes installing to: ${servletDirectory}</echo> <input propertyname="documentRoot">Web application document root</input> <input propertyname="servletDirectory" defaultValue="/usr/servlets" promptChar="?">PHP classes install dir</input> <echo>HTML pages installed to ${documentRoot}</echo> <echo>PHP classes installed to ${servletDirectory}</echo> <!-- Having the user choose from a set of valid choices --> <echo>Choose a valid option:</echo> <input propertyname="optionsChoice" validargs="foo,bar,bob"> Which item would you like to use </input> ```