如何隐藏标签(标记)如果隐藏文本字段?

时间:2017-10-10 09:25:23

标签: javascript textbox show-hide

如果隐藏了文本框,我正在使用此javascript来隐藏标签。在某些情况下有一些触发器隐藏文本框,并且有一个textlabel(只是文本框的信息)但textlabel独立于文本框 - 它的id名称是post。但是当文本框被隐藏时,标签仍然存在。

    const char* vertShaderCode="uniform mat4 trans;\n"
    "uniform mat4 proj;\n"
    "attribute vec3 coord;\n"
    "attribute vec2 texcoord;\n"
    "attribute vec4 color;\n"
    "varying vec2 outUV;\n"
    "varying vec4 m_Color;\n"
    "\n"
    "void main(void)\n"
    "{\n"
    "    gl_Position = proj*trans*vec4(coord,1.0);\n"
    "    outUV = texcoord;\n"
    "    m_Color = color;\n"
    "}\n"
    "\n"
    ;

    const char* fragShaderCode="#ifdef GL_ES\n"
    "precision highp float;\n"
    "#endif\n"
    "uniform sampler2D m_texture;\n"
    "varying vec2 outUV\n;"
    "varying vec4 m_Color;\n"
    "\n"
    "void main(void)\n"
    "{\n"
    "    vec4 texColor = texture2D(m_texture,outUV);\n"
    "    gl_FragColor = vec4((texColor.xyz + m_Color.xyz)*0.5, texColor.w);\n"
    "}\n"
    "\n"
    ;

0 个答案:

没有答案