title: using javascript to detect whether the url exists before display in iframe
body: <p>I'm using javascript to pass a dynamic url to iframe src. but sometimes the url does not exist, how could i detect the non-exist url beforehand, so that i can hide the iframe that with 404 error.</p>