html中的單引號、雙引號及其轉義使用
在 (x)HTML 中,一些特殊字元應該進行 HTML 實體轉義。
常見的有:&(and)、"(雙引號)、'(單引號)、<(小於號)、>(大於號),這些在 (x)HTML 文件內容中應該分別轉換成:&、"、'、< 和 >。
IE 瀏覽器暫時不支援單引號的實體名稱,IE 瀏覽器暫時只支援單引號的實體編號。
這也是 PHP htmlspecialchars 函式把單引號轉義成 ',而不是 ' 的原因。
Character | Entity Number | Entity Name | Description |
---|---|---|---|
" | " | " | quotation mark |
' | ' | ' (does not work in IE) | apostrophe |
& | & | & | ampersand |
< | < | < | less-than |
> | > | > | greater-than |
相關推薦
js、html中的單引號、雙引號及其轉義使用
雙引號 ace bsp less 兼容 後來 問題 工具類 alc 摘自:http://blog.csdn.net/changhong009/article/details/46004343 ' ----單引號 $#39; ---
js、html中的單引號、雙引號及其轉義使用(轉)
下面列出各種表達方法:<html><body><input value="外雙引號內雙引號-錯誤" type="button" onclick="alert("OK");" /><br /><input value="外單引號內單引號-錯誤" type="
html中的單引號、雙引號及其轉義使用
在 (x)HTML 中,一些特殊字元應該進行 HTML 實體轉義。 常見的有:&(and)、"(雙引號)、'(單引號)、<(小於號)、>(大於號),這些在 (x)HTML 文件內容中應該分別轉換成:&、"、
js、html中的單引號、雙引號及其轉義使用(轉)
下面列出各種表達方法: <html> <body> <input value="外雙引號內雙引號-錯誤" type="button" onclick="alert("OK");" /><br /> <input value="外單引號內單引號-錯誤" ty
shell中單引號、雙引號、反斜杠簡說
能夠 col 都是 嵌套 修改文件 字符 變量名 令行 文件中 需求:ssh遠程修改文件,變量從文件中獲取,插入遠程服務器的文件裏 shell腳本中的單引號和雙引號一樣都是字符串的界定符,而不是字符的界定符。單引號用於保持引號內所有字符的字面值,即使引號內的\和回車也不
SQL語句中有關單引號、雙引號和加號的問題
類型 OS clas 條件 分析 student 條件查詢 log div 字符串數據是用單引號包在外面的,而+號只是用來連接這些字符串的. 數據庫裏的字段是整型的時候不要加單引號,是字符串的時候要加,其它類型根據實際情況來,雙引號就是用來拼接字符串的,單引號是sql文的固
linux中單引號、 雙引號,反引號的區別
單引號、 雙引號反引號的區別1、單引號、雙引號用於用戶把帶有空格的字符串賦值給變量的分界符。 [root@localhost sh]# str="Today is Monday" [root@localhost sh]# echo $str Today is Monday 如果沒有
SQL語句中單引號、雙引號和反引號的區分
單引號 ’ 和雙引號 “ 在標準 SQL 中,字串使用的是單引號。 如果字串本身也包括單引號,則使用兩個單引號(注意,不是雙引號,字串中的雙引號不需要另外轉義)。 MySQL對 SQL 的擴充套件,允許使用單引號和雙引號兩種。 反引號 ` 反引號一般在Esc鍵的下方,和~在一起。它是為了區分MySQ
PHP中的單引號、雙引號和轉義字元詳解
PHP單引號及雙引號均可以修飾字符串型別的資料,如果修飾的字串中含有變數(例$name);最大的區別是: 雙引號會替換變數的值,而單引號會把它當做字串輸出。 轉義字元,顧名思義會將規定的語法用"\"來輸出。但語法規定在不同的系統中轉義字元的作用不同,例如:windows下的回車換行符用"\r"或"
php中的單引號、雙引號和轉義字元
在PHP中,可以使用 echo() 和 print() 語句傳送資料到Web瀏覽器,也可以使用它們傳送HTML 程式碼到Web瀏覽器。從技術上講,echo() 和 print() 是語言構造,而不是函式,這裡用了一對括號,從而有助於與變數以及PHP的其他部分割槽分開。這兩個語句本質上沒有什麼區別,因此用那
關於linux下使用grep和egrep中單引號‘’、雙引號“”、小括號()和大括號{}的一些問題
最近在linux下使用grep和egrep發現了一些問題。以前一直以為egrep包含了grep,因此grep中採用的格式,在egrep中能得到相同的結果。其實這個想法是不對的。 原因主要是在於正則表示式和擴充套件正則表示式的一些元符號上的問題,在這篇帖子(http://w
python3 中的字串(單引號、雙引號、三引號)以及字串與數字的運算
python3中的字串是一種常見的資料型別。 字串有多種表現形式:單引號、雙引號和三引號,且這些字串的表現形式(單、雙、三)都必須是成對出現的。 單、雙引號是英文的:‘’和"",三引號則是三個單引號或者三個雙引號都可以:""" """或者''' ''',在python中打
shell中單引號、雙引號、反引號、反斜槓的區別
可以識別4種不同型別的引字元號: 單引號字元' 雙引號字元" 反斜槓字元\ 反引號字元` 1. 單引號 ( '' ) # grep Susan phonebook Susan Goldberg 403-212-4921 Susan Topple 212-234-23
Python中單引號、雙引號和三引號的區別
1、雙引號 表示字串 s1="hello,world!" 如果要寫成多行,需要用連線符(/),如下: s2="hello, / worl
shell中的單引號、雙引號、反引號
參考:https://blog.csdn.net/iamlaosong/article/details/54728393http://www.runoob.com/linux/linux-shell-variable.html(1)單引號' '括起來的內容,全部被識別為普通字
shell中反引號、單引號、雙引號的使用
總結一些簡單的shell小知識,在一位網友的部落格基礎上做了一些修改,感謝一些網友的分享。 一、shell中的反引號(` `)的作用 將反引號(` `)內的字串當作shell命令來執行,返回值是命令的執行的結果,起到的是一個命令的替換作用。 舉例: 輸出日期 二、she
PHP、HTML單引號、雙引號轉義
返回字串,該字串為了資料庫查詢語句等的需要在某些字元前加上了反斜線。這些字元是單引號(’)、雙引號(")、反斜線(\)與NUL(NULL 字元)。 預設情況下,PHP指令magic_quotes_gp
python中的單引號、雙引號、三引號
在Python的string前面加上‘r’, 是為了告訴編譯器這個string是個raw string,不要轉意 -----------------------------------------------------引號------------------------
單引號、雙引號、int和char
sci 32位 def 說我 需要 mil 來看 不同的 單引號 首先說一下C語言中用單引號和雙引號的不同(一直搞不清楚): 單引號代表的是一個整數,而這個整數的值是編譯器所采用的字符集中的字符序列對應的值。所以一般‘A‘和ASCII中的65意義相同。對於雙引號定義的我們可
python之路 -- 單引號、雙引號&三引號
span 區別 執行 跨行 註銷 bold 雙引號 int col 單引號與雙引號完全一模一樣;沒有區別。例如: print(‘hello, world!‘)print("hello, world!")執行結果都是輸出:hello,world! 三引號可以表示註銷和