Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Ulises http://superchafa.com/blog

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

pop window desde un link

// esta es una forma muy buena de hacer un pop up desde un link

<a href="http://google.com/" onclick="window.open(this.href, 'popupwindow', 
  'width=400,height=300,scrollbars,resizable'); 
  return false;"
>

Funcion para obtener la fecha actual

// esta funcion te regresa la fecha actual, tiene una condicional contemplando la cuestion del bug Y2K, usala de la siguiente manera:
La fecha de hoy es <script language="JavaScript" type="text/javascript">document.write(month + ", " + date + ", " + year)</script>

<script language="JavaScript">
<!--
var months = new Array(12)
months[1] = "January";
months[2] = "February";
months[3] = "March";
months[4] = "April";
months[5] = "May";
months[6] = "June";
months[7] = "July";
months[8] = "August";
months[9] = "September";
months[10] = "October";
months[11] = "November";
months[12] = "December";


var today = new Date()
var month = months[today.getMonth() + 1]
var date = today.getDate()
var year = today.getYear()
if (year >= 100 && year <= 1999)
{year=year + 1900}
else
{year=year}

//-->
</script>
« Newer Snippets
Older Snippets »
2 total  XML / RSS feed