javascript - Turn off (Ignore) placeholder attribute in html text/search elements -


If possible, I would like to be able to turn the placeholder on / off from my search box.

  & lt; Input type = "text" placeholder = "enter name" /> & Lt; Input type = "search" placeholder = "type to search" />   

What I have tried so far:

  Input [type = "search"] :: - WebKit-Input-placeholder {Content: "" ; Red color; / * Test selector * /}   

JSFiddle

same The path is to do with an angle:

In the controller:

  $ scope.placeholder_value1 = ""; // blank $ scope.placeholder_value2 = "some value"; // some value   

In this view:

   & Lt; Input type = "text" placeholder = "{{placeholder_value2}}" />    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -