In this below script, PreSaveAction Javascript validation using SharePoint, Javascript and html
Add the script editor webpart.
Add the below code:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js">
<script type="text/javascript">
function PreSaveAction(){
var txtnumber = $('input[title="num_Phone"]').val();
if (!isNaN(txtnumber)){
alert("Please enter a Number only");
$('input[title="num_Phone"]').focus();
return false;
}
else{
return true;
}
}
</script>
No comments:
Post a Comment