I don't know how many of us has noted this tag "MSOLayout_InDesignMode" .This is a hidden HTML field present on the page. So using that its simple.
The HTML looks like this:
<input type="hidden" name="MSOLayout_InDesignMode" id="MSOLayout_InDesignMode" value="" />
if (document.getElementById("MSOLayout_InDesignMode").value != "1")
{
//do something
}
else
{
//do something
}
No comments:
Post a Comment