How to change text fontsize from onchange()

时间:2016-02-12 20:26:33

标签: javascript html html5

I am trying to change the fontsize of a text html element from an onchange().

Here is my code :

2 is digit: yes
+ is digit: no
a is digit: no

3 个答案:

答案 0 :(得分:0)

I just moved some quotes around I think

grunt.registerTask('oneThenOther', [
    'one',
    'two'
  ]);

答案 1 :(得分:0)

I think this is what you are looking for: https://jsfiddle.net/16mgy0xm/9/

module Main where

import Graphics.Gloss
import Graphics.Gloss.Interface.Pure.Game

data Board = Board Color Color Color

forward :: Board -> Board
forward (Board x y z) = Board y z x

backward :: Board -> Board
backward (Board x y z) = Board z x y

displayPoint :: Point -> Color -> Picture
displayPoint (x, y) c = translate x y $ color c $ circle 10

displayBoard :: Board -> Picture
displayBoard (Board x y z) =
  Pictures $ zipWith displayPoint coordinates [x, y, z]
  where coordinates = [(0, 30), (-30, -30), (30, -30)]

react :: Event -> Board -> Board
react (EventKey (SpecialKey KeyTab) Down mods _) b =
  case shift mods of
    Up   -> forward b
    Down -> backward b
react _ b = b

main :: IO ()
main =
  let window = InWindow "Buggy" (100, 100) (200, 200)
      board  = Board blue red yellow
  in play window black 24 board displayBoard react (const id)

答案 2 :(得分:0)

You should avoid using inline event handlers (onchange=...) and use standards. The following works:

parameters.setPictureSize(sc.width, sc.height) 

See: https://jsfiddle.net/sxsbcdy2/