-1
我想設置客戶端將輸入到文本字段中的文本的樣式。該文本應顯示爲我的HTML格式。我有3個switch語句。 我如何使用跨度來設計它。使用跨度jquery設計字符串
var text = myProjectpage.model.currentChoices.TextLine1Text;
switch(myProjectpage.model.currentChoices.TextLine1Text.length) {
case 1:
layer_InHTML= text; // allows what the user types to show in my html
//one letter should be big.
break;
case 2:
layer_InHTML = "<span ='font-size:2.5em;'>text.charAt(0)</span>"+charAt(1)
// this does not work. How can I improve this?
//two letters should be big
case 3:
//three letters should be big.
break;
你可以請創建一個jsfiddle嗎? – brk