CopyPastor

Detecting plagiarism made easy.

Score: 1.7874481410598468; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2020-10-19
by Divyesh\_08

Original Post

Original - Posted on 2018-05-01
by Harish Kulkarni



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Easiest way to do it :-

<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
function success() { if(document.getElementById("textsend").value==="") { document.getElementById('button').disabled = true; } else { document.getElementById('button').disabled = false; } }
<!-- language: lang-html -->
<textarea class="input" id="textsend" onkeyup="success()" name="demo" placeholder="Enter your Message..."></textarea> <button type="submit" id="button" disabled>Send</button>

<!-- end snippet -->
**Reference**: [solution][1]

[1]: https://stackoverflow.com/questions/7067005/disable-button-whenever-a-text-field-is-empty-dynamically
Easiest way to do it :-

Simple Html and JavaScript : Run the snippet (Just 7 lines)
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
function success() { if(document.getElementById("textsend").value==="") { document.getElementById('button').disabled = true; } else { document.getElementById('button').disabled = false; } }
<!-- language: lang-html -->
<textarea class="input" id="textsend" onkeyup="success()" name="demo" placeholder="Enter your Message..."></textarea> <button type="submit" id="button" disabled>Send</button>
<!-- end snippet -->
I have used textarea, but you can use any html input tags and try it out! Happy coding!


        
Present in both answers; Present only in the new answer; Present only in the old answer;