It works just as though it was AC, the bridge is there so the input can be either polarity as would be the case from a wall outlet. In fact, you should be able to connect the DC either way around.
That was the good news - now the bad news. Many chargers and adapters do not have a bridge rectifier at their input pins but a transformer instead. It you connect DC to one of these it will burn out. also you have to be careful about how much DC you use instead of AC. Some cheaper adapters rely on the AC power (in Watts) being lower than the same voltage DC and push their components to the limits of their ratings. If you use DC they may generate more heat and become unreliable.
Your best option is to buy a car adapter and connect it to a car battery. Don't be tempted to just connect voltage directly to the phone/laptop, the charger circuit inside the adapter is necessary to regulate and limit the current at the output.
Brian.