As written, there is nothing to make the pin go High once the connection to Ground is released.
Do this instead:
void setup()
{
pinMode(button,INPUT);
digitalWrite (button, HIGH); // turns on internal pullup resistor
Serial.begin(9600);
}
Now val will reliably = HIGH immeditately whenever the switch is not pressed, and LOW when it is pressed.