Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 把手未填充输入字段中第一个空格后的数据 {{{#if data.project_name} {{data.project_name} {{/if}_Html_Input_Handlebars.js - Fatal编程技术网

Html 把手未填充输入字段中第一个空格后的数据 {{{#if data.project_name} {{data.project_name} {{/if}

Html 把手未填充输入字段中第一个空格后的数据 {{{#if data.project_name} {{data.project_name} {{/if},html,input,handlebars.js,Html,Input,Handlebars.js,在h1标记内正确显示“这是值”(data.project_name==“这是值”),但 {{#if data.project_name}} <h1>{{data.project_name}}</h1> {{/if}} {{{#if data.project_name} {{/if} 在输入中只显示“This”,请帮助…我知道了,一位朋友告诉我问题出在哪里 {{#if data.project_name}} &

在h1标记内正确显示“这是值”(data.project_name==“这是值”),但

    {{#if data.project_name}}
        <h1>{{data.project_name}}</h1>
    {{/if}} 
{{{#if data.project_name}
{{/if}

在输入中只显示“This”,请帮助…

我知道了,一位朋友告诉我问题出在哪里

    {{#if data.project_name}}
         <input type="text" value={{data.project_name}}>
    {{/if}}

当我不加引号时,车把只带了“ 这将“作为值属性的值,并丢弃字符串的其余部分,尽管我不知道为什么会这样

编辑

我还在github上发现了一个关于车把问题的已解决问题:

    <input type="text" value="{{data.project_name}}">