Google Search

Google Search

HTML/JavaScript

Thursday, September 1, 2011

Java script CDATA

//
function validate(f)
{

var regex = /\W+/;
var str = "";

if (f.title.value == "")
{
str += "\nThe title field is blank.";
}
if (f.pathnew.value == "")
{
str += "\nThe file path is blank.";
}

if (str == "")
{
f.submit();
}
else
{
alert(str);
return false;
}
} //]]>

No comments:

Post a Comment