If you start with Javascript, read this book to understand its operation and to avoid its pitfalls.
If you already know JavaScript, perfect you rediscovering the good practices and which to avoid.
This book is a bit technical and does not cover ALL Javascript, but it's happy! JavaScript is a powerful language that suffers from some design problems inherited from the browser wars. It is important to know them and, if possible, avoid them.
The chapter on inheritance prototype alone is worth reading this book.
With this book, you will have a good foundation to code Javascript client or server side.
If you wish to use the DOM API, jQuery is the solution to your problem and jQuery Cookbook your next read.
If you want more details and examples turn to JavaScript Cookbook.