0
我有一個MVC4 Razor應用程序,我需要在包含@class的javascript部分中構造一個字符串。我怎樣才能逃避在字符串中使用它?如何在帶有MVC4的字符串中使用@class
var S = 'select * from html where url=\"www.yahoo.com\" and xpath=\'\//div[contains('@class,\"techSpecsTable/\")]\' '
我該如何逃避@class?
你不需要逃避'@ class',你需要什麼「@ class」之前的轉義就是你的撇號。 –