How can I change button value with stylish?

user2775944

This is the button:

<input type="submit" name="submitbutton" value=" black "><input>

I want to change value "black" to "white" but I can't. How can I change the value with stylish?

Brock Adams

Stylish is an add-on/extension that just allows you to inject CSS. The value of that button is a JavaScript / DOM property; Stylish cannot change those.

You need to install Greasemonkey (Firefox) or Tampermonkey (Chrome).

Then you can run this userscript to change that value:

// ==UserScript==
// @name     _YOUR_SCRIPT_NAME
// @include  http://YOUR_SERVER.COM/YOUR_PATH/*
// @grant    GM_addStyle
// ==/UserScript==
/*- The @grant directive is needed to work around a design change
    introduced in GM 1.0.   It restores the sandbox.
*/
var btn = document.querySelector ("input[name='submitbutton']");
if (btn) {
    btn.value = "White";
}
else {
    alert ("From GM script: Button not found");
}

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

How to change button value?

분류에서Dev

How can i change activity using login (username and password) ,button ?

분류에서Dev

Glade: How can I set the value of a spin button?

분류에서Dev

How can I get and change a value of a line inside of a file if the value of such line is unknown by me?

분류에서Dev

Can i change value of final int

분류에서Dev

Why can't I change the value in GridView?

분류에서Dev

How can I automatically change the CSS min-height value of a div when a JavaScript is performed?

분류에서Dev

How can I change a wpf Databound grid cell based on the cell value?

분류에서Dev

jQuery - How I can reset the html() of this button?

분류에서Dev

How can I place a checkbox within a button?

분류에서Dev

How can I make a functioning animated button?

분류에서Dev

How do I change this value using regex?

분류에서Dev

how to change the textfield value when the button is clicked in uitableviewcell iOS

분류에서Dev

How can I change the prompt of the terminal permanently

분류에서Dev

How can I change the default gateway?

분류에서Dev

Docky - how can I change jDownloader icon?

분류에서Dev

How can i change hyperlink color with JQuery?

분류에서Dev

How can I change the default Nautilus Bookmarks?

분류에서Dev

How can I change the colors of the slices of the pie?

분류에서Dev

How can I run a script on resolution change?

분류에서Dev

Can I change how file completion is displayed?

분류에서Dev

How can I change the system font?

분류에서Dev

How do I change/replace fragment on button press?

분류에서Dev

How to change button color

분류에서Dev

How can I display the latest value in Chart?

분류에서Dev

How can I test for a file having a value?

분류에서Dev

how to i can return value in mvc 4

분류에서Dev

How can i render partial view as modal popup on button click?

분류에서Dev

How can I transform an html button link to a pandas dataframe?

Related 관련 기사

  1. 1

    How to change button value?

  2. 2

    How can i change activity using login (username and password) ,button ?

  3. 3

    Glade: How can I set the value of a spin button?

  4. 4

    How can I get and change a value of a line inside of a file if the value of such line is unknown by me?

  5. 5

    Can i change value of final int

  6. 6

    Why can't I change the value in GridView?

  7. 7

    How can I automatically change the CSS min-height value of a div when a JavaScript is performed?

  8. 8

    How can I change a wpf Databound grid cell based on the cell value?

  9. 9

    jQuery - How I can reset the html() of this button?

  10. 10

    How can I place a checkbox within a button?

  11. 11

    How can I make a functioning animated button?

  12. 12

    How do I change this value using regex?

  13. 13

    how to change the textfield value when the button is clicked in uitableviewcell iOS

  14. 14

    How can I change the prompt of the terminal permanently

  15. 15

    How can I change the default gateway?

  16. 16

    Docky - how can I change jDownloader icon?

  17. 17

    How can i change hyperlink color with JQuery?

  18. 18

    How can I change the default Nautilus Bookmarks?

  19. 19

    How can I change the colors of the slices of the pie?

  20. 20

    How can I run a script on resolution change?

  21. 21

    Can I change how file completion is displayed?

  22. 22

    How can I change the system font?

  23. 23

    How do I change/replace fragment on button press?

  24. 24

    How to change button color

  25. 25

    How can I display the latest value in Chart?

  26. 26

    How can I test for a file having a value?

  27. 27

    how to i can return value in mvc 4

  28. 28

    How can i render partial view as modal popup on button click?

  29. 29

    How can I transform an html button link to a pandas dataframe?

뜨겁다태그

보관