Tuesday, March 13, 2012

Setting Title with Javascript....

IS it possible to set the content of the title tag using Java script.
Thanks,
SmithWhy noy just use asp.net?
Sub Page_Load
Dim strTitle as String
If someexpression then
strTitle = "Some Title"
Else
strTitle = "Some Other Title"
End If
End Sub
Do your title tag like this:
<title><%=strTitle%></title>
"Smith Sonian" <SSonian@.hotmail.com> wrote in message
news:Oftv4igmEHA.1652@.TK2MSFTNGP09.phx.gbl...
> IS it possible to set the content of the title tag using Java script.
> Thanks,
> Smith
>
<script type=text/javascript> document.title="My title"; </script>

0 comments:

Post a Comment