JavaScript javascript display :none function javascript display none toggle,javascript display none by class,javascript

Firstly apologies if this is not a very good question, but I am not very familiar with Javascript at all. Secondly I did do research to find my problem I refer you to this post

I wrote this very basic function

function hideBtn(){
var btn = document.getElementById("submitBtn").style.cssText="display:none";
}

echo'<input type="submit" value="submit" name="submit" id="submitBtn" class="buttono" onclick="hideBtn()" />';

Which I want to hide my submit button after form is clicked as currently it is still displaying enter image description here

Any help very much welcomed

Can it be that when the form is submitted the page is refreshed, and thus the function was not actually triggered?

Answer:1

Can it be that when the form is submitted the page is refreshed, and thus the function was not actually triggered?

Yes, that's very likely to be the issue. If you don't want the page refreshed, don't use a submit button, or submit the form to another window, or use an submit event handler on the form element and prevent the default action.

Separately: It's best not to completely replace all of the styles on the element. Instead, just set the specific style you want:

var btn = document.getElementById("submitBtn").style.display = "none";

The style property on elements is an object with properties for each of the CSS styles.

Answer:2

My sample string is var str = "My name is {name}.from {area}"; I need both {name} and {area} separately from that string. I TRIED var s = "My name is {name}.from {area}"; var matches = s.match(/\...

My sample string is var str = "My name is {name}.from {area}"; I need both {name} and {area} separately from that string. I TRIED var s = "My name is {name}.from {area}"; var matches = s.match(/\...

  1. find matching string matlab
  2. find matching string in list python
  3. find matching string in array javascript
  4. find matching string python
  5. find matching string in excel
  6. find matching string in list c#
  7. find matching string in list java
  8. find matching string in array java
  9. find matching string in r
  10. find matching string in array python
  11. find matching string in sql
  12. find matching string in array c#
  13. find matching string in jquery
  14. find matching string in array php
  15. find matching string in php
  16. find matching string in array
  17. find matching string in dataframe python
  18. find matching string js
  19. find matching string in c++
  20. finding matching string

I am trying to implement the smooth scrolling effect described here jquery smooth scroll to an anchor? using Godaddy's Website builder tool. Unfortunately the tool adds lots of its own boiler-plate ...

I am trying to implement the smooth scrolling effect described here jquery smooth scroll to an anchor? using Godaddy's Website builder tool. Unfortunately the tool adds lots of its own boiler-plate ...

  1. select class element javascript
  2. select class element jquery
  3. select class element css
  4. select class element
  5. select element class c#
  6. select first class element jquery
  7. select first class element css
  8. js select class element
  9. select class inside element css
  10. select class inside element
  11. css select element class starts with
  12. jquery select element class starts with
  13. jquery select element class contains
  14. selenium select element class
  15. jquery select element class and id
  16. d3 select element class
  17. select parent element class
  18. select child element class
  19. jsoup select element class
  20. css select class within element

So I am trying to make a dynamic quiz and am struggling with adding text to my radio inputs. I use a for loop to make several radio inputs. I would like the text to be on the same line as each radio ...

So I am trying to make a dynamic quiz and am struggling with adding text to my radio inputs. I use a for loop to make several radio inputs. I would like the text to be on the same line as each radio ...

  1. jquery same text
  2. jquery find same text

I have input type=file for upload file. When I choose 2-3 files, I have list of file. How can I delete only one object which I choose? <input type="file" data-ng-click="initFiles2()" data-rule-...

I have input type=file for upload file. When I choose 2-3 files, I have list of file. How can I delete only one object which I choose? <input type="file" data-ng-click="initFiles2()" data-rule-...

  1. delete object from array javascript
  2. delete object from array
  3. delete object from list python
  4. delete object from s3 bucket
  5. delete object from photo
  6. delete object from object javascript
  7. delete object from memory python
  8. delete object from vector c++
  9. delete object from photo in photoshop
  10. delete object from array java
  11. delete object from json array
  12. delete object from s3 bucket java
  13. delete object from arraylist java
  14. delete object from dict python
  15. delete object from array typescript
  16. delete object from array python
  17. delete object from list c#
  18. delete object from s3 boto3
  19. delete object from workspace r
  20. delete object from json javascript