Support vector machine has been applied in many research fields, such as pattern recognition and function estimate. There is a shortcoming in Weighted SVM and Fuzzy SVM, which take the importance of sample into account but neglect the relative importance of each feature with respect to the classification task. In this paper a SVM approach is proposed based on the feature weighting, i.e. Feature Weighted SVM (FWSVM). This method first estimates the relative importance (weight) of each feature by computing the information gain. Then, it utilizes the weights for computing the inner product and Euclidean distance in kernel functions. In this way the computing of kernel function can avoid being dominated by trivial relevant or irrelevant features. Theoretical analysis and experimental results show that the FWSVM is more robust and has the better performance of generalization than the traditional SVM.